On Fri, Jan 31, 2014 at 5:28 PM, Dan Sommers <d...@tombstonezero.net> 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 -- https://mail.python.org/mailman/listinfo/python-list