dm_time_from_unix Interface

public interface dm_time_from_unix

Converts Unix epoch to integer or string representation.

Called by

interface~~dm_time_from_unix~~CalledByGraph interface~dm_time_from_unix dm_time_from_unix proc~dm_time_to_beats dm_time_to_beats proc~dm_time_to_beats->interface~dm_time_from_unix proc~dm_html_beat dm_html_beat proc~dm_html_beat->proc~dm_time_to_beats

Module Procedures

private impure elemental function time_from_unix_integer(epoch, year, month, day, hour, minute, second) result(rc)

Converts the 8-byte calendar time epoch in UTC to broken-down time representation. The argument epoch is the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). The function calls gmtime_r() internally (SUSv2).

Returns E_SYSTEM if the system call failed.

Arguments

Type IntentOptional Attributes Name
integer(kind=i8), intent(in) :: epoch

Unix time stamp in seconds (UTC).

integer, intent(out), optional :: year

Year part of time stamp.

integer, intent(out), optional :: month

Month part of time stamp.

integer, intent(out), optional :: day

Day of month part of time stamp.

integer, intent(out), optional :: hour

Hour part of time stamp.

integer, intent(out), optional :: minute

Minute part of time stamp.

integer, intent(out), optional :: second

Second part of time stamp.

Return Value integer

private impure elemental function time_from_unix_string(epoch, time) result(rc)

Converts the 8-byte calendar time epoch in UTC to ISO 8601 representation. The argument epoch is the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). The function calls gmtime_r() internally (SUSv2).

Returns E_SYSTEM if the system call failed.

Arguments

Type IntentOptional Attributes Name
integer(kind=i8), intent(in) :: epoch

Unix time stamp in seconds (UTC).

character(len=TIME_LEN), intent(out) :: time

ISO 8601 representation.

Return Value integer