# SPL Module Reference: time

load "time";

    A module for time and time manipulations

builtin time();
builtin time_local(time);
builtin time_gm(time);
builtin time_diff(time1, time0);
builtin time_fmt(format, tm);
builtin time_mk(tm);
builtin time_mkgm(tm);

builtin time();

    This function returns the number of seconds since the epoch.

builtin time_local(time);

    This function converts the number of seconds since the epoch (as
    returned by time()) so a node with the childs .sec, .min, .hour, .mday
    .month, .wday, .year, .yday, .gmtoff, .isdst and .zone. (It is simply a
    wrapper to the struct tm as defined in time.h.)

builtin time_gm(time);

    This function converts the nuber of seconds since the epoch (as
    treturned by time()) to a time node as returned by time_local(),
    but in GMT.

builtin time_diff(time1, time0);

    This function returns the difference in seconds between time1 and time0.
    It expects two ints containing the number of seconds since the epoch as
    returned by time().

builtin time_fmt(format, tm);

    This Function formats a time node as returned by time_local() according
    to the strftime manpage. This is simply a wrapper to the strftime() C
    library function.

builtin time_mk(tm);

    This function converts a time node as returned by time_local() to the
    count of seconds since the epoch as returned by time().

builtin time_mkgm(tm);

    This function converts a time node as returned by time_gm() to the
    count of seconds since the epoch as returned by time(), it works similar
    to mktime but assumes the time node is in GMT.

    This function is not available on the CYGWIN platform.

Generated by SPLDOC. | http://www.clifford.at/spl/