Date and Time Functions pull different time


I actually don't have a code problem, but it has come to my attention that the time is different from mine. I use US Central time, and the time seems to be 5 hours ahead.

I expect the date and time functions to provide my time, not some other time zone's. Please fix.

from datetime import datetime
now =

print '%s:%s:%s' % (now.hour, now.minute, now.second)

I get 4:08 when it is 11:08 at my house.


It looks to be reading UTC time, while your time looks to be +7 hours east of the Prime Meridian (Greenwich), or -5 hours west of it.

What do you get with,


Just this instant, I'm getting,

=> datetime.datetime(2017, 7, 22, 12, 2, 16, 584000)

which is my local time.



This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.