diff options
author | Björn-Egil Dahlberg <[email protected]> | 2011-11-30 19:12:45 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2011-12-02 15:41:14 +0100 |
commit | 73b4ed6d1141e760fcc108e45d3d66ca110f1018 (patch) | |
tree | 4e160b1c454c79904dcb5e6e4e913eb61616eab0 /erts/preloaded | |
parent | 2a1f035f777b5caef0c47dfd863675ef51296c3d (diff) | |
download | otp-73b4ed6d1141e760fcc108e45d3d66ca110f1018.tar.gz otp-73b4ed6d1141e760fcc108e45d3d66ca110f1018.tar.bz2 otp-73b4ed6d1141e760fcc108e45d3d66ca110f1018.zip |
Silence warnings in prim_file
Diffstat (limited to 'erts/preloaded')
-rw-r--r-- | erts/preloaded/src/prim_file.erl | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl index a301abb667..87fdb3fb8f 100644 --- a/erts/preloaded/src/prim_file.erl +++ b/erts/preloaded/src/prim_file.erl @@ -1360,17 +1360,17 @@ datetime_to_epoch(Datetime) -> datetime_to_gregorian_seconds(Datetime) - ?SECONDS_PER_DAY * ?DAYS_FROM_0_TO_1970. -%% perhaps like this - -posix_time(Time) -> - EpochStart = {{1970,1,1},{0,0,0}}, - {Days,{Hour,Min,Sec}} = calendar:time_difference(EpochStart, Time), - 86400*Days + 3600*Hour + 60*Min + Sec. - -posix_to_erlang_time(Sec) -> - OneMillion = 1000000, - Time = calendar:now_to_datetime({Sec div OneMillion, Sec rem OneMillion, 0}), - erlang:universaltime_to_localtime(Time). +%% erl_tar uses this convention (investigate) +%% +%% posix_time(Time) -> +%% EpochStart = {{1970,1,1},{0,0,0}}, +%% {Days,{Hour,Min,Sec}} = calendar:time_difference(EpochStart, Time), +%% 86400*Days + 3600*Hour + 60*Min + Sec. +%% +%% posix_to_erlang_time(Sec) -> +%% OneMillion = 1000000, +%% Time = calendar:now_to_datetime({Sec div OneMillion, Sec rem OneMillion, 0}), +%% erlang:universaltime_to_localtime(Time). % from calendar, slightly modified |