1> NowSecs = calendar:datetime_to_gregorian_seconds( calendar:universal_time()).
63260897707
2> Twenty_Four_Hours_From_Now = 24 * 60 * 60.
86400
3> NewTimeSecs = NowSecs + Twenty_Four_Hours_From_Now.
63260984107
4> New_Date_Time = calendar:gregorian_seconds_to_datetime(NewTimeSecs).
{{2004,8,29},{7,35,7}}
http://schemecookbook.org/Erlang/TimeArithmetic
댓글 없음:
댓글 쓰기