Skip to content

Commit

Permalink
Merge pull request #32 from ElectronicRU/fix_tz_shift
Browse files Browse the repository at this point in the history
Fix tz_shift/{2,3} for UTC
  • Loading branch information
Dmitry Melnikov committed Nov 30, 2016
2 parents a7115bb + 446e557 commit 7855cd3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/localtime.erl
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ local_to_local_dst(LocalDateTime, TimezoneFrom, TimezoneTo) ->
% DstAbbr = String()
% DstName = String()
% ErrDesc = atom(), unknown_tz
tz_name(_UtcDateTime, "UTC") ->
{"UTC", "UTC"};
tz_name(LocalDateTime, Timezone) ->
case lists:keyfind(get_timezone(Timezone), 1, ?tz_database) of
false ->
Expand Down Expand Up @@ -153,8 +151,6 @@ tz_name(LocalDateTime, Timezone) ->
% Hours = Minutes = Integer(),
% {Shift, DstShift} - returns, when shift is ambiguous
% ErrDesc = atom(), unknown_tz
tz_shift(_UtcDateTime, "UTC") ->
0;
tz_shift(LocalDateTime, Timezone) ->
case lists:keyfind(get_timezone(Timezone), 1, ?tz_database) of
false ->
Expand Down

0 comments on commit 7855cd3

Please sign in to comment.