[Zope3-dev] Re: OT: pytz
Ignas Mikalajunas
ignas.mikalajunas at gmail.com
Fri Jul 28 05:49:28 EDT 2006
> Thanks. I'd seen localize() in the README but all the examples have an
> explicit is_dst passed which I didn't want. I didn't realize that
> without it it would guess the right one (except during the 1h ambiguous
> period).
>
> Florent
The is_dst parameter is more like "If it is ambiguous prefer DST",
even when calling localize without passing the parameter it will not
do any guessing as is_dst is set to False by default. If you want
localize to warn you about ambiguous time you should pass is_dst=None
which will raise an exception instead of assuming that you prefer non
DST times in ambiguous cases,
Ignas Mikalajūnas
More information about the Zope3-dev
mailing list