the Gravity of Python 2

Chris Angelico rosuav at gmail.com
Thu Jan 9 10:17:45 EST 2014


On Fri, Jan 10, 2014 at 2:01 AM, Dan Sommers <dan at tombstonezero.net> wrote:
> On Thu, 09 Jan 2014 09:14:22 -0500, Roy Smith wrote:
>
>> Oh, and another thing I can do with a datetime that I can't do with a
>> unix timestamp.  I can represent the day I was born.
>
> At the risk of dating myself, the day I was born is -231094800.

Which, according to a Unix build of Python, is quite representable:

>>> time.strftime("%Y-%m-%d",time.gmtime(-231094800))
'1962-09-05'

This isn't a problem. Now, if you were considering yourself for a
romantic candle-lit dinner and a movie afterward, then maybe there's
some risk in dating yourself :)

ChrisA



More information about the Python-list mailing list