diff options
author | Björn-Egil Dahlberg <[email protected]> | 2011-12-07 16:08:55 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2011-12-08 14:12:03 +0100 |
commit | 9baa361811a4dd936e73136ea20320423980604b (patch) | |
tree | 4d01bafcdd70d7f1fedb1cfe2745559f0988cc11 /erts | |
parent | a37f854be3aaee3786d555a28bb4c8d53384a852 (diff) | |
download | otp-9baa361811a4dd936e73136ea20320423980604b.tar.gz otp-9baa361811a4dd936e73136ea20320423980604b.tar.bz2 otp-9baa361811a4dd936e73136ea20320423980604b.zip |
Change name of bif universaltime_to_seconds/1
* erlang:universaltime_to_seconds/1 changed to
erlang:universaltime_to_posixtime/1
* erlang:seconds_to_universaltime/1 changed to
erlang:posixtime_to_universaltime/1
Let prim_file.erl reflect these changes.
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/bif.c | 4 | ||||
-rw-r--r-- | erts/emulator/beam/bif.tab | 4 | ||||
-rw-r--r-- | erts/emulator/test/time_SUITE.erl | 4 | ||||
-rw-r--r-- | erts/preloaded/src/prim_file.erl | 10 |
4 files changed, 11 insertions, 11 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c index 12dc7b3a48..55f4798892 100644 --- a/erts/emulator/beam/bif.c +++ b/erts/emulator/beam/bif.c @@ -3387,7 +3387,7 @@ BIF_RETTYPE universaltime_to_localtime_1(BIF_ALIST_1) /* convert calendar:universaltime_to_seconds/1 */ -BIF_RETTYPE universaltime_to_seconds_1(BIF_ALIST_1) +BIF_RETTYPE universaltime_to_posixtime_1(BIF_ALIST_1) { Sint year, month, day; Sint hour, minute, second; @@ -3411,7 +3411,7 @@ BIF_RETTYPE universaltime_to_seconds_1(BIF_ALIST_1) /* convert calendar:seconds_to_universaltime/1 */ -BIF_RETTYPE seconds_to_universaltime_1(BIF_ALIST_1) +BIF_RETTYPE posixtime_to_universaltime_1(BIF_ALIST_1) { Sint year, month, day; Sint hour, minute, second; diff --git a/erts/emulator/beam/bif.tab b/erts/emulator/beam/bif.tab index 0d6af46aa5..8cc568b16c 100644 --- a/erts/emulator/beam/bif.tab +++ b/erts/emulator/beam/bif.tab @@ -810,8 +810,8 @@ bif erlang:check_old_code/1 # # New in R15B # -bif erlang:universaltime_to_seconds/1 -bif erlang:seconds_to_universaltime/1 +bif erlang:universaltime_to_posixtime/1 +bif erlang:posixtime_to_universaltime/1 # # Obsolete # diff --git a/erts/emulator/test/time_SUITE.erl b/erts/emulator/test/time_SUITE.erl index b8e2cf51d2..4d12e3449c 100644 --- a/erts/emulator/test/time_SUITE.erl +++ b/erts/emulator/test/time_SUITE.erl @@ -172,7 +172,7 @@ univ_to_seconds(Config) when is_list(Config) -> test_univ_to_seconds([{Datetime, Seconds}|DSs]) -> io:format("universaltime = ~p -> seconds = ~p", [Datetime, Seconds]), - Seconds = erlang:universaltime_to_seconds(Datetime), + Seconds = erlang:universaltime_to_posixtime(Datetime), test_univ_to_seconds(DSs); test_univ_to_seconds([]) -> ok. @@ -183,7 +183,7 @@ seconds_to_univ(Config) when is_list(Config) -> test_seconds_to_univ([{Datetime, Seconds}|DSs]) -> io:format("universaltime = ~p <- seconds = ~p", [Datetime, Seconds]), - Datetime = erlang:seconds_to_universaltime(Seconds), + Datetime = erlang:posixtime_to_universaltime(Seconds), test_seconds_to_univ(DSs); test_seconds_to_univ([]) -> ok. diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl index e5cb1d5c03..36cbe329e8 100644 --- a/erts/preloaded/src/prim_file.erl +++ b/erts/preloaded/src/prim_file.erl @@ -812,7 +812,7 @@ write_file_info_int(Port, File, file_info_validate_atime(Atime, _) when Atime =/= undefined -> Atime; file_info_validate_atime(undefined, local) -> erlang:localtime(); file_info_validate_atime(undefined, universal) -> erlang:universaltime(); -file_info_validate_atime(undefined, posix) -> erlang:universaltime_to_seconds((erlang:universaltime())). +file_info_validate_atime(undefined, posix) -> erlang:universaltime_to_posixtime(erlang:universaltime()). file_info_validate_mtime(undefined, Atime) -> Atime; file_info_validate_mtime(Mtime, _) -> Mtime. @@ -1349,13 +1349,13 @@ plgv(_, [], D) -> D. from_seconds(Seconds, posix) when is_integer(Seconds) -> Seconds; from_seconds(Seconds, universal) when is_integer(Seconds) -> - erlang:seconds_to_universaltime(Seconds); + erlang:posixtime_to_universaltime(Seconds); from_seconds(Seconds, local) when is_integer(Seconds) -> - erlang:universaltime_to_localtime(erlang:seconds_to_universaltime(Seconds)). + erlang:universaltime_to_localtime(erlang:posixtime_to_universaltime(Seconds)). to_seconds(Seconds, posix) when is_integer(Seconds) -> Seconds; to_seconds({_,_} = Datetime, universal) -> - erlang:universaltime_to_seconds(Datetime); + erlang:universaltime_to_posixtime(Datetime); to_seconds({_,_} = Datetime, local) -> - erlang:universaltime_to_seconds(erlang:localtime_to_universaltime(Datetime)). + erlang:universaltime_to_posixtime(erlang:localtime_to_universaltime(Datetime)). |