Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.090 X-Spam-Evidence: '*H*': 0.82; '*S*': 0.00; 'url:sourceforge': 0.03; 'subject:question': 0.10; 'cc:addr:python-list': 0.11; 'jan': 0.12; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'utc': 0.16; 'url:)': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'typing': 0.19; 'seems': 0.21; 'cc:addr:python.org': 0.22; 'install': 0.23; 'comparing': 0.24; 'skip': 0.24; 'cc:2**0': 0.24; 'compare': 0.26; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; '>>>>': 0.31; 'doc': 0.31; 'types.': 0.31; 'universal': 0.31; 'created': 0.35; 'case,': 0.35; 'objects': 0.35; 'operations': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'version': 0.36; 'doubt': 0.36; 'false': 0.36; 'two': 0.37; 'others.': 0.38; 'skip:p 20': 0.39; 'according': 0.40; 'even': 0.60; 'results.': 0.60; 'up,': 0.60; 'happen': 0.63; 'different': 0.65; '30,': 0.65; 'here': 0.66; 'subject:. ': 0.67; 'between': 0.67; 'special': 0.74; '4:29': 0.84; 'ato': 0.84; 'greenwich': 0.84; 'to:none': 0.92; 'differences': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; bh=vf+PNdXyp1oMQdI73n52uHBajwF+hRnYs76JVmSw9O0=; b=BVz1FeUO1aPDAPUhL1/OUVww7arvTSxd8/EXchaLaj1F2eM9bAtbakj6plXnOlz8J4 ycpxhpVQ9uVh8PGOKO3z8chT7y1YFvrMUN91l5xlxZ9nEUV1XzNXuu6j+mDh3FzVs364 MJJXb0aOinrrnpkXFslxX7QTDn+HJKk4eeRwsTCJagjHo89FXCaSY5lhi+3USgI64XtC NQdmG39E9j6FxUE0TkuHUstWpgvsvwcSABGesbSTJ0IruN4K24eD6kP9BISLqyWGXSA9 /ol1gXPLfJ9M4FawqSOEUErVg8vdywL2wGLYBlYJaLIt03hIjSEecTxZJzBBlcfBNHaL 8PzA== MIME-Version: 1.0 X-Received: by 10.66.160.2 with SMTP id xg2mr9294598pab.23.1391017652254; Wed, 29 Jan 2014 09:47:32 -0800 (PST) In-Reply-To: References: Date: Thu, 30 Jan 2014 04:47:32 +1100 Subject: Re: pytz question: GMT vs. UTC From: Chris Angelico Cc: Python Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391017661 news.xs4all.nl 2891 [2001:888:2000:d::a6]:46219 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:64946 On Thu, Jan 30, 2014 at 4:29 AM, Skip Montanaro wrote: > According ato the pytz doc (http://pytz.sourceforge.net/): > > "=E2=80=98UTC=E2=80=99 is Universal Time, also known as Greenwich Mean Ti= me 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") =3D=3D 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