datetime and tzinfo

John Hunter jdhunter at ace.bsd.uchicago.edu
Thu Sep 16 09:45:52 EDT 2004


>>>>> "John" == John Hunter <jdhunter at nitace.bsd.uchicago.edu> writes:

    John> I am using the tzinfo classes from the datetime docs, eg
    John> UTC, USTimeZone, and the instantiations Pacific, Central,
    John> Eastern, etc.  I would like to take a datetime instance in
    John> the UTC timezone and construct the equivalent in another
    John> time zone.

OK, I'm a moron.  There is something magical about the send button.  I
can study the docs for an hour, try 18 different things, fail
repeatedly, write a post describing my problem, and then after that
any 5 second glance back at the docs is guaranteed to reveal the
solution

  dt2 = dt1.astimezone(Central)

Sigh....



More information about the Python-list mailing list