[Tutor] Hey.need help on time
eryksun at gmail.com
Thu Sep 6 09:51:36 CEST 2012
On Thu, Sep 6, 2012 at 3:21 AM, Keitaro Kaoru <tokyo.rook at gmail.com> wrote:
> been trying to change this so it wont use my server time. but my
> actual time here in the us.EST. havent been able to figure it out
> def sstime(user, body, m):
> os.environ['TZ'] = 'US/Eastern'
Now just call time.tzset(), and it should work.
> tstr1 = time.strftime("%a, %b-%d-%Y", time.tzset())
I don't know what you're doing here. strftime() uses localtime() if
you don't provide a time tuple. time.tzset() just returns None.
More information about the Tutor