2010-12-29

Re: Converting date to epoch

Alexander,did you even consider that I might need to convert a date to epoch in a python script? :)

2 comments:

  1. Errrrr......

    >>> datetime.datetime.now().strftime(u'%s')
    '1293705254'

    ?

    ReplyDelete
  2. >>> import datetime
    >>> datetime.datetime.now().strftime(u'%s')
    '%s'

    or in other words, "%s" is not nearly universally supported. The example above was on OpenSolaris.

    ReplyDelete