Commit Graph

16 Commits

Author SHA1 Message Date
aj heller
ca64849fed fixes #7; adds many tests for #7; cleans up ezic_flatten debug messages
Issue #7: Some Zones no longer observing DST are broen.

The matchspec generation function for universal time was wrong,
whereas it was fine for wall and local times. Fixing that line, and
considering the `current` flatzone time, was enough to get TZs like
Tokyo and Jamaica working correctly in tested cases.
2012-12-17 23:55:37 -08:00
aj heller
8e4dcb784b makes ezic:local_to_utc errors into values; updates tests accordingly
Like in d98eed, errors are now returned as values rather than crashing
processes. This is a short-term solution for consistency, and can be
refactored to a saner model later.
2012-12-17 22:07:56 -08:00
aj heller
843a03c09b make test works again 2012-12-17 18:10:07 -08:00
aj
63c8a29198 updated the readme. error-tested the local_to_utc methods. light changes to the makefile 2010-11-14 01:38:23 -08:00
aj
d664384c60 Costa Rica's flatzones aren't processed after 1992. Gotta check her out. 2010-11-13 22:54:44 -08:00
aj
3f438e66e0 handled case where zone and rule both end. dealing with Tripoli recursion bug (ambiguous year in ezic_date:for_rule) 2010-11-13 03:25:50 -08:00
aj
a7b0adcbce repaired ezic_date:add_offset. able to normalize plain dates. notes and tests
add_offset was calculating DST differences wrong. It assumed to lose an hour, DST would be {-1,0,0}, in fact, DST went from {1,0,0} to {0,0,0}. add_offset now uses their differences (hence requires both as arguments)
normalize/2 was added to be able to set an arbitrary flag on a plain (i.e. native erlang datetime tuple) date. This is complicated by the fact that atoms "minimum", "max", etc. are still valid and need to fall through the normalization unaltered (for now).
2010-11-12 03:07:15 -08:00
aj
3e77287db6 there is a subtle bug in wall-time calculations. Asia/Irkutsk times are incorrect. 2010-11-12 01:22:50 -08:00
aj
7985f9e74f zone end projection was buggy, since it didn't normalize dates before passing them on (required for ezic_date:all_times/1) 2010-11-12 00:17:20 -08:00
aj
c976e63349 removed all warnings. fixed bug in ezic_zone:next/3. unit tests for ezic_zone:next/3
ezic_zone:next/3 was not filtering the Zones to only those after UTCFrom. This may have caused an endless loop, always returning the earliest zone regardless of the progress of time. I wont know; I caught it rather early.
2010-11-11 23:52:10 -08:00
aj
e48e793a36 flattening algorithm needs to be reworked.
also, datetime methods aren't consistent in their naming and return values.
2010-11-10 03:18:57 -08:00
aj
d84a0c1822 datetime manipulation is now much clearer. tests were added, and expectations stated explicitly in many places. rules got lots of attention. 2010-11-10 01:52:13 -08:00
aj
d00937c3e9 lots of gutting. purposes, input, and output were unclear in many places. still broken. 2010-11-08 01:29:15 -08:00
aj
9ad8f3c826 lots of work towards flattening the records. stalled at ezic_rule:next_event/4 2010-11-07 18:32:37 -08:00
aj
2f727dd8bb consolidated logic, added date normalization and overlap methods. 2010-11-04 00:39:10 -07:00
aj
e9d247784e separated out rule and date logic. WIP: flattening the data, absolute from fuzzy dates, comparing dates 2010-11-03 23:33:06 -07:00