[Chicago] Working with timezones

Suchandra Thapa suchandra+chipy at gmail.com
Fri Nov 18 15:43:01 EST 2016


If you need to implement this yourself, just be sure to consider that this
is dependent on the date as well.  I.e. depending on when daylight savings
time goes into effect, your timezone names will change.  To be really
accurate, you'll need the year as well.

Suchandra

On Fri, Nov 18, 2016 at 2:33 PM Chris Foresman <foresmac at gmail.com> wrote:

> Ugh, dealing with time/timezones is the worst, AMIRITE? Here’s what I need
> to do:
>
> Calculate an offset from UTC, and use the offset to get a list of
> corresponding timezone names, i.e., I’ve detmerined that I need all the
> timezones associated with offset -06:00; which includes “America/Chicago”,
> “CT”, etc. I looked at pytz, but it looks like it only goes the other
> direction, i.e. pytz.timezone(‘America/Chicago’) will give me a tzinfo
> instance with UTC offset -06:00.
>
> Outside of building my own reverse database, does anyone have ideas how to
> make this work?
>
>
> Thanks,
> Chris Foresman
> foresmac at gmail.com
>
>
>
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> https://mail.python.org/mailman/listinfo/chicago
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20161118/92ef1202/attachment.html>


More information about the Chicago mailing list