Handle fmt_shift(0) -> 0.

tz_shift(_, "UTC") returns 0, but fmt_shift/1 previously did not handle
that.  An alternative fix would be for tz_shift(_, "UTC") to return
{'+', 0, 0}.
This commit is contained in:
David Hull 2015-11-21 20:30:56 +00:00
parent 458cedf2a2
commit 40d241b138

View file

@ -205,6 +205,8 @@ fmt_shift({'+', H, M}) ->
H * 60 + M; H * 60 + M;
fmt_shift({'-', H, M}) -> fmt_shift({'-', H, M}) ->
-(H * 60 + M); -(H * 60 + M);
fmt_shift(0) ->
0;
fmt_shift(Any) -> fmt_shift(Any) ->
throw(Any). throw(Any).