Python - datetime of a specific timezone

I am having the hardest time trying to get the current time in EDT timezone.

print datetime.time(datetime.now()).strftime("%H%M%S")

datetime.now([tz]) has an optional tz argument, but it has to be of type datetime.tzinfo... I have not ben able to figure out how to define a tzinfo object for Eastern timezone... Seems like it should be pretty simple, but I cant figure it out without importing an additional library.

11
задан wuntee 1 November 2010 в 18:35
поделиться