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:
parent
458cedf2a2
commit
40d241b138
1 changed files with 2 additions and 0 deletions
|
@ -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).
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue