summaryrefslogtreecommitdiff
path: root/src/jlib.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jlib.erl')
-rw-r--r--src/jlib.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jlib.erl b/src/jlib.erl
index 4adf8879..cb70c5a4 100644
--- a/src/jlib.erl
+++ b/src/jlib.erl
@@ -561,7 +561,7 @@ rsm_encode_count(Count, Arr)->
i2l(I) when is_integer(I) -> integer_to_list(I);
i2l(L) when is_list(L) -> L.
-%% Timezone = utc | {Hours, Minutes}
+%% Timezone = utc | {Sign::string(), {Hours, Minutes}} | {Hours, Minutes}
%% Hours = integer()
%% Minutes = integer()
timestamp_to_iso({{Year, Month, Day}, {Hour, Minute, Second}}, Timezone) ->
@@ -572,6 +572,8 @@ timestamp_to_iso({{Year, Month, Day}, {Hour, Minute, Second}}, Timezone) ->
Timezone_string =
case Timezone of
utc -> "Z";
+ {Sign, {TZh, TZm}} ->
+ io_lib:format("~s~2..0w:~2..0w", [Sign, TZh, TZm]);
{TZh, TZm} ->
Sign = case TZh >= 0 of
true -> "+";