Re: [Hampshire] Is a given date DST?

Top Page
Author: Chris Smith
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Is a given date DST?

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x585d3100.hantslug.org.uk.25227': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Tue Aug 12 12:34:11 2008 BST
gpg: using DSA key 11BEF6408586B4B2
gpg: Can't check signature: No public key
Daniel Pope wrote:
> On Tue, Aug 12, 2008 at 11:19:21AM +0100, Chris Smith wrote:
>> utc_date = datetime(2008, 04, 3, 10, 00, 00, tzinfo=pytz.utc)
>> local_date = utc_date.astimezone(pytz.timezone('Europe/London'))
>
> Damn, beaten to it :)


:)

> Unfortunately just inverting what you describe does not work. Unless you
> use localize() pytz doesn't attempt to decide whether you're in DST or
> not.


Yes, I tried the inversion and was surprised that it didn't work. I
can't see a good reason for it: we give it a date in one specific
timezone and ask to convert it to another specific timezone, so why
should it only work one way round?

Chris
--
Chris Smith <cjs94@???>