handled case where zone and rule both end. dealing with Tripoli recursion bug (ambiguous year in ezic_date:for_rule)

This commit is contained in:
aj
2010-11-13 03:25:50 -08:00
parent a7b0adcbce
commit 3f438e66e0
8 changed files with 185 additions and 108 deletions

View File

@@ -50,6 +50,16 @@ for_rule_test_() ->
{{1981,9,30},{15,0,0}}
},
ezic_date:for_rule(IrkutskRule2, {8,0,0}, {1,0,0}, {0,0,0}, 1981))
%% Africa/Tripoli recursion bug
, ?_assertEqual({
{ {{1952,1,1},{0,0,0}}, {{1951,12,31},{23,0,0}} }, % {oldDst, newDst}
{{1951,12,31},{23,0,0}},
{{1951,12,31},{23,0,0}} },
ezic_date:for_rule(
#rule{from=1952, to=only, in=1, on=1, at=#tztime{}, save={0,0,0}},
{1,0,0}, {1,0,0}, {0,0,0}, 1951))
].

View File

@@ -8,5 +8,4 @@ all() ->
, eunit:test(ezic_zone)
, eunit:test(ezic_parse)
, eunit:test(ezic_rule)
,ok.