Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

Tips on using python's datetime module. Wow. I’ve run in to problems with datetime and timezones before, but I had no idea how intrinsic those problems were to the design of the library.

Tagged , , ,

3 comments

  1. It's well known if you want to do anything with timezones, you have to use dateutils.

    Edward Z. Yang - 6th July 2009 16:46 - #

  2. Curious what his admonition against datetime.now() means for commonly-accepted practice for timestamps in Django.

    Brooks Travis - 6th July 2009 17:29 - #

  3. I couldn't find any of those issues in the Python bug tracker. (I only did a very quick search for datetime, so I may be wrong). These sound like serious issues that should be fixed, and they're more likely to be fixed if they're reported.

    Gavin Panella - 8th July 2009 11:34 - #

Sign in with OpenID

Auto-HTML: Line breaks are preserved; URLs will be converted in to links.

Manual XHTML: Enter your own, valid XHTML. Allowed tags are a, p, blockquote, ul, ol, li, dl, dt, dd, em, strong, dfn, code, q, samp, kbd, var, cite, abbr, acronym, sub, sup, br, pre

A django site