Monday, 9 September 2013

Python Datetime offset

Python Datetime offset

Do the terms "GMT offset" and "UTC offset" refer to the same "offset"?
I.e. if I have a Python/Django timezone-aware datetime called mydt, and I
print it this way:
In [1]: mydt.strftime('%Y-%m-%dT%H:%M:%S%z')
Out[1]: '2013-07-20T23:50:00+0200'
Is the UTC offset returned for %z in the form +HHMM or -HHMM the same as a
GMT offset for the same date? In my case it is +0200.
I tried googling, but what I've found is the history of GMT and why UTC
was needed later on. Although things look like GMT and UTC are the same, I
need to be 100% sure.

No comments:

Post a Comment