Skip to content

Make Timezones pytz compatible#1

Open
ericsandine wants to merge 3 commits into
mayple:masterfrom
ericsandine:make-timezones-pytz-compatible
Open

Make Timezones pytz compatible#1
ericsandine wants to merge 3 commits into
mayple:masterfrom
ericsandine:make-timezones-pytz-compatible

Conversation

@ericsandine
Copy link
Copy Markdown

@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.

1 participant