dm_time_to_unix Function

public impure elemental function dm_time_to_unix(time, epoch, useconds) result(rc)

Uses

    • unix
  • proc~~dm_time_to_unix~~UsesGraph proc~dm_time_to_unix dm_time_to_unix unix unix proc~dm_time_to_unix->unix

Converts 32-characters long ISO 8601/RFC 3339 time stamp to Unix time stamp (Epoch). The function calls timegm() internally (not in POSIX, but available since 4.3BSD), and then removes the time zone offset. The returned Epoch is always in UTC. The output does not contain microseconds.

The function returns E_INVALID if the given ISO 8601 time stamp time is invalid. However, this function does not perform a full validation of the time stamp for performance reasons. Make sure to only pass valid time stamps. If the call to timegm() fails, E_SYSTEM is returned.

Arguments

Type IntentOptional Attributes Name
character(len=TIME_LEN), intent(in) :: time

ISO 8601 time stamp.

integer(kind=i8), intent(out) :: epoch

Unix time stamp.

integer, intent(out), optional :: useconds

Additional microseconds.

Return Value integer


Calls

proc~~dm_time_to_unix~~CallsGraph proc~dm_time_to_unix dm_time_to_unix c_timegm c_timegm proc~dm_time_to_unix->c_timegm c_tm c_tm proc~dm_time_to_unix->c_tm

Called by

proc~~dm_time_to_unix~~CalledByGraph proc~dm_time_to_unix dm_time_to_unix proc~dm_time_diff dm_time_diff proc~dm_time_diff->proc~dm_time_to_unix proc~dm_time_to_beats dm_time_to_beats proc~dm_time_to_beats->proc~dm_time_to_unix proc~dm_html_beat dm_html_beat proc~dm_html_beat->proc~dm_time_to_beats