Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!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.021 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'dan': 0.09; 'second.': 0.09; 'subject:question': 0.10; 'cc:addr:python-list': 0.11; 'python': 0.11; 'jan': 0.12; 'badly.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'missing?': 0.16; 'storing': 0.16; 'temperatures': 0.16; 'utc,': 0.16; 'weird': 0.16; 'wrote:': 0.18; 'help.': 0.21; '(the': 0.22; '(in': 0.22; 'cloud': 0.22; 'cc:addr:python.org': 0.22; '31,': 0.24; 'sorry,': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'external': 0.29; 'converting': 0.30; 'cool': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'crash': 0.31; 'everyone': 0.33; 'fri,': 0.33; 'device': 0.34; 'problem': 0.35; 'knows': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'representing': 0.36; "didn't": 0.36; 'should': 0.36; 'pm,': 0.38; 'either': 0.39; 'range': 0.61; "you're": 0.61; 'details': 0.65; 'subject:. ': 0.67; 'therefore': 0.72; '100': 0.79; 'liberty': 0.84; 'meters': 0.84; 'temperature': 0.84; 'water.': 0.84; 'to:none': 0.92 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; bh=o8hSX3+hFNb0nbza8EsbFgIHsko7dEpY6mGnl+E4Y0c=; b=bXbzuXhA2Chmi7TXqIbAXEyEw7Imq18iHH8u9/NTfIf4HwcbVAk57IHgmRFkMArMjZ k72C4II1/lyqUUmXbBcBGcMIg8MHTU7/aWwId6+v05tND9yrx5gKceM8k5YF55q8YyLJ ZBDmQT3EGSNKEUAsBEKQhy6Jx9Ws3iE4QosDK98G7qOdtSfx2VC9RL4PyhbXtrMP6d3Q 9orQXWOKvoMJLSrSlw1MvvpCPcIE4VO1ur3MY8HqBtPkTx1gsW4aDPUiwBpaFz6MXYqj 4kEZxdbzfL68q9KU3oap0d4Z/1tJw9dfQb9yk1wayGR/PxtiQG4eOpwMC+io8ZzVfzy8 YW2w== MIME-Version: 1.0 X-Received: by 10.68.201.10 with SMTP id jw10mr19085676pbc.25.1391150550239; Thu, 30 Jan 2014 22:42:30 -0800 (PST) In-Reply-To: References: <3g6je9h7fp29pebi7aa04tigc50hm3vepj@4ax.com> <52E9BB8C.80000@mrabarnett.plus.com> <52eb287c$0$29972$c3e8da3$5496439d@news.astraweb.com> Date: Fri, 31 Jan 2014 17:42:30 +1100 Subject: Re: pytz question: GMT vs. UTC From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391150554 news.xs4all.nl 2863 [2001:888:2000:d::a6]:49497 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65100 On Fri, Jan 31, 2014 at 5:28 PM, Dan Sommers wrote: > ObPython: My program retrieves temperatures (in Kelvins) from an > external device (the details of which I am not at liberty to discuss) > and stores them in the cloud (because that's where all the cool kids > store data these days), and there's something really weird going on. > > > $ python ./program.py > temperature1 is -100 K > temperature2 is 100 K > temperature2 is hotter than temperature1 > > But everyone knows that -100K is hotter than 100K. I tried converting > to UTC, but that didn't help. What am I missing? I'm sorry, you have completely misunderstood the problem here. You are storing data in the cloud, which means you're representing everything with water. It is therefore fundamentally illogical to use any temperature outside the range [273.15K, 373.15K], because otherwise your cloud will freeze or boil, and either way, it'll crash badly. Plus, converting to UTC? Puh-leeze. You should be using kilogram meters per second. ChrisA