sproutsocial / walltime-js

A JavaScript library for easily translating a UTC time to a "Wall Time" for a particular time zone.
MIT License
121 stars 12 forks source link

Fix zone line parsing with range values #15

Closed jgable closed 11 years ago

jgable commented 11 years ago

This is a fix for a critical issue with time zones that have end dates with ranges like the Apr Sun>=1 3:00 below in the America\Chihuahua zone.

# Chihuahua (near US border)
Zone America/Ojinaga    -6:57:40 -  LMT 1922 Jan 1 0:02:20
            -7:00   -   MST 1927 Jun 10 23:00
            -6:00   -   CST 1930 Nov 15
            -7:00   -   MST 1931 May  1 23:00
            -6:00   -   CST 1931 Oct
            -7:00   -   MST 1932 Apr  1
            -6:00   -   CST 1996
            -6:00   Mexico  C%sT    1998
            -6:00   -   CST 1998 Apr Sun>=1 3:00
            -7:00   Mexico  M%sT    2010
            -7:00   US  M%sT