On Fri, Jan 31, 2014 at 1:26 PM, Ben Finney wrote:
> He also reinforces the message that UTC is the canonical timezone for
> storing and manipulating timestamp values, and we should be converting
> to/from those canonical values as early/late as possible in our programs.
Call it a "UTC Sandwich",
Ben Finney writes:
> Time zones are a hairy beast to manage, made all the more difficult
> because national politicians continually fiddle with them which means
> they can't just be a built-in part of the Python standard library.
PyCon 2013 had a good talk on calendaring and timezone issues
http
On Wed, Jan 29, 2014 at 1:52 PM, Skip Montanaro wrote:
> Following up on my earlier note about UTC v. GMT, I am having some
> trouble grokking attempts to convert a datetime into UTC. Consider
> these three values:
>
import pytz
UTC = pytz.timezone("UTC")
LOCAL_TZ = pytz.timezone("A
Skip Montanaro writes:
> Following up on my earlier note about UTC v. GMT, I am having some
> trouble grokking attempts to convert a datetime into UTC.
For what it's worth, you're not alone. Time zones are a hairy beast to
manage, made all the more difficult because national politicians
continua
On 01/29/2014 01:52 PM, Skip Montanaro wrote:
Following up on my earlier note about UTC v. GMT, I am having some
trouble grokking attempts to convert a datetime into UTC.
Okay, let's see what GMT does for us:
GMT = pytz.timezone("GMT")
u = GMT.normalize(s)
u
datetime.datetime(2014, 1, 29, 21,
Following up on my earlier note about UTC v. GMT, I am having some
trouble grokking attempts to convert a datetime into UTC. Consider
these three values:
>>> import pytz
>>> UTC = pytz.timezone("UTC")
>>> UTC
>>> LOCAL_TZ = pytz.timezone("America/Chicago")
>>> LOCAL_TZ
>>> now = datetime.datetim