Skip to content

Instantly share code, notes, and snippets.

@2get
Created June 18, 2014 07:29
Show Gist options
  • Save 2get/d794ca28ebc2b4403035 to your computer and use it in GitHub Desktop.
Save 2get/d794ca28ebc2b4403035 to your computer and use it in GitHub Desktop.
date comparision in python
Python 3.4.0 (default, Mar 26 2014, 11:08:39)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from time import time
>>> time()
1403076335.497517
>>> time() == time()
False
>>> time() is time()
False
Python 2.7.5 (default, Mar  9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from time import time
>>> time()
1403076390.115298
>>> time() == time()
True
>>> time() is time()
False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment