Re: [Hampshire] Is a given date DST?

Etusivu

Vastaa
Lähettäjä: Daniel Pope
Päiväys:  
Vastaanottaja: hampshire
Aihe: Re: [Hampshire] Is a given date DST?
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.

Dan