mde / timezone-js

DEPRECATED: Timezone-enabled JavaScript Date object. Uses Olson zoneinfo files for timezone data.
824 stars 183 forks source link

Fix bug where exception is thrown if rule is null #104

Closed TrevorBurnham closed 11 years ago

TrevorBurnham commented 11 years ago

I ran into this error when using the "Europe/Kaliningrad" timezone, though I don't see why. For timestamps before a certain date (somewhere around 1980), getAbbreviation throws an exception because it tries to access rule[6] when rule is null. You can confirm this by running the spec I added without the patch to date.js.

@longlho Let me know if this patch makes sense to you.

longlho commented 11 years ago

yeah this certainly makes sense. Let me take a look to see if it's a data issue or a parsing issue.