Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #64946 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2014-01-30 04:47 +1100 |
| Last post | 2014-01-30 04:47 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: pytz question: GMT vs. UTC Chris Angelico <rosuav@gmail.com> - 2014-01-30 04:47 +1100
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-01-30 04:47 +1100 |
| Subject | Re: pytz question: GMT vs. UTC |
| Message-ID | <mailman.6094.1391017661.18130.python-list@python.org> |
On Thu, Jan 30, 2014 at 4:29 AM, Skip Montanaro <skip@pobox.com> wrote:
> According ato the pytz doc (http://pytz.sourceforge.net/):
>
> "‘UTC’ is Universal Time, also known as Greenwich Mean Time or GMT in
> the United Kingdom."
>
> If they are equal, why don't timezone objects created from those two
> strings compare equal?
>
>>>> pytz.timezone("UTC") == pytz.timezone("GMT")
> False
There are some technical differences between UTC and GMT, which almost
never come up, and which I very much doubt are significant here (does
pytz care about leap seconds?). But what I'm seeing - at least in the
version of pytz that I picked up by typing 'sudo pip install pytz' on
Debian Wheezy - is that the two are different types. UTC seems to be a
special case, while GMT is like the others. That may be why they're
not comparing equal, even though all operations might happen to
produce the same results.
ChrisA
Back to top | Article view | comp.lang.python
csiph-web