When I print datetime.now(), currently it’s 17:00 in the UK,but it’s printing 16:00. Is this anything to do with GMT time, and can this be corrected?
It has to do with UTC, which on this site is fixed to UTC +/- 0. You must be one hour east of UTC, or on daylight savings time, while CC is not factoring in DST. Your own computer (local Shell) will register the correct time for your time zone assuming your system time is automatically adjusted for DST.
28 Likes
datetime.now() will give the UTC time
4 Likes
On CC, yes. On your local installation it will give your timezone.
13 Likes
Thanks, I was really confused about the time. Got my answer now.
4 Likes
Thank you. I was confused on why it was giving me the wrong time.
1 Like
Thank you. That’s really helped
1 Like