From 40d241b13821c034aae4248e343741603188e5a6 Mon Sep 17 00:00:00 2001 From: David Hull Date: Sat, 21 Nov 2015 20:30:56 +0000 Subject: [PATCH] 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}. --- src/localtime.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/localtime.erl b/src/localtime.erl index 42781e3..c3eee0c 100644 --- a/src/localtime.erl +++ b/src/localtime.erl @@ -205,6 +205,8 @@ fmt_shift({'+', H, M}) -> H * 60 + M; fmt_shift({'-', H, M}) -> -(H * 60 + M); +fmt_shift(0) -> + 0; fmt_shift(Any) -> throw(Any).