top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

list to convert time zone abbreviation to full time zone in python?

+1 vote
536 views

I would like to convert time zone abbreviation to full time zone in Python.

I'm currently writing dict with this information : http://www.timeanddate.com/library/abbreviations/timezones/

Questions :
* are there the same list somewhere (I didn't found in pytz) ?
* is it possible to append this list in pytz or in standard python date module?

posted Dec 2, 2013 by Naveena Garg

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
Is this what you are looking for: http://timezonedb.com/download

1 Answer

+1 vote

is it possible to append this list in pytz or in standard python date module ?

It could go into pytz (but generated from the IANA database, not from the list you quote). Whether it should go into pytz is debatable.

If you need to map an abbreviation back to a single timezone you are solving the wrong problem, because you can only map an abbreviation back to a list of possible timezones (And that list might change when the database is corrected). Also, to correctly represent this you need to specify the point in time. EST in 'Tue Dec 3 20:44:00 EST 2013' maps to about 3 timezones. EST in 'Tue Dec 3 20:44:00 EST 2011' maps
to about 6.

answer Dec 3, 2013 by Jai Prakash
Similar Questions
+1 vote

I have a Rails application with a default time zone of UTC. This works fine for almost everything. Now I have a situation where I would like to present the values in a datetime_select offset by a specific time zone. As far as I know, this helper does not have an option to specify the time zone that is used when persisting this data. When the form is submitted, it only sends the year, month, day, hour, and minute fields. ActiveRecord is responsible for converting these values into the time zone configured for the application. In this case, I want to change the time zone for only these fields so that it is localized to the user (but still store the correct UTC time). How can I make this change?

+1 vote

During a LTE attach, MME may send the UE a EMM Information message with Universal time and local time zone IE. This IE contains Year, month, day, hour, min, sec.
My problem is that I can not find any reference yet about what should be the value of the year. Is it calculated from 1900 or 2000 or as it is ? or there is some other reference year ?
Any reference spec with this particular information will be highly helpful.

+2 votes

How to convert utc time to a time in a particular time zone. As I need to display local time of Timezone(-05:00).

+2 votes

I have an app with users in one timezone with the date / time stored in their location. Now there are more users in more locations and I would like to support them - ideally without changing to historical data.

At the moment the app uses a time offset field to allow two people to see one note expressed in their timezone.

There are two use cases for this one is the free/busy calendar, the other is the meeting invite ICS file.

At the moment I would like to support ICS which are GMT based.

My guess is that:

  • Assign each user to their own timezone
  • I take the diary row ($start_date, $start_time) and convert it to a GMT timestamp
  • Make the ICS file

I am keen to hear of better solutions or ideas.

...