git.iko.soy/typeable/timezone-olson
on master help sign in
Fix reversed logic in splitOlson.
commit183d9a8d510bb701c946cfd488a5301407dc8f86 authorYitzchak Gale <gale@sefer.org> dateMon 17 May 2010, 12:03 (16 years ago) parent9fb3c85
1 file changed+3−2
Data/Time/LocalTime/TimeZone/Olson/Render.hs+3−2
Data/Time/LocalTime/TimeZone/Olson/Render.hs+3−2
@@ -99,8 +99,9 @@ splitOlson (OlsonData transs ttinfos leaps posix) =
9999 posix)
100100 where
101101 cutoff = 0x80000000 -- 2^31
102− ( leaps1 , leaps2 ) = partition ((>= cutoff) . leapTime) leaps
103− (transs1', transs2') = partition ((>= cutoff) . transTime) transs
102+ fitsIn32bits x = x < cutoff && x >= negate cutoff
103+ ( leaps1 , leaps2 ) = partition (fitsIn32bits . leapTime) leaps
104+ (transs1', transs2') = partition (fitsIn32bits . transTime) transs
104105 assoc1 = mkAssoc [0] transs1'
105106 assoc2 = mkAssoc [] transs2'
106107 transs1 = mkTranss transs1' assoc1