Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Timezones pytz compatible #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ericsandine
Copy link

@ericsandine ericsandine commented Sep 24, 2019

It seems like Timezone Name should be a pytz compatible name so it can be used as a valid timezone in Python. I'm not sure if that's what you intended or not but I figured I would open this PR in case other people are looking for it. Feel free to close if that wasn't the intention here.

This is the before:

In [49]: for key, value in facebook_timezones.facebookTimezoneIdToTimezoneName.iteritems():
    ...:     try:
    ...:         pytz.timezone(value)
    ...:     except:
    ...:         print 'Unknown %s' % (value)
    ...:
Unknown Unknown
Unknown America/Argentina_San_Luis
Unknown America/Argentina_Buenos_Aires
Unknown America/Argentina_Salta
Unknown America/Blanc_Sablon
Unknown America/Port_Of_Spain
Unknown Num/Timezones

Might be a better idea to swap this for something like facebookTimezoneIdToPytzTimezoneName?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant