tmToTime
tmToTime(r_tm) =>x_time
Description
Given a tm structure, returns the integer value of the time it represents.
r_tm is a defstruct similar to POSIX's tm struct:
struct tm {
int tm_sec; /* seconds after the minute: [0, 61] */
int tm_min; /* minutes after the hour: [0, 59] */
int tm_hour; /* hours after midnight: [0, 23] */
int tm_mday; /* day of the month: [1, 31] */
int tm_mon; /* month of the year: [0, 11] */
int tm_year; /* year since 1900 */
int tm_wday; /* days since Sunday: [0, 6] */
int tm_yday; /* days since January: [0, 365] */
int tm_isdst; /* daylight saving time flag: <0,0,>0*/
};
All time conversion functions assume local time, not GMT time.
Arguments
Value Returned
Examples
fileTimeModified( "~/.cshrc" )
=> 793561559
timeToString(793561559)
=> "Feb 23 09:45:59 2022"
x = timeToTm(793561559)
=>array[11]:1702872
x->??
(tm_sec 59 tm_min 45 tm_hour
9 tm_mday 23 tm_mon 1
tm_year 22 tm_wday 4 tm_yday
53 tm_isdst 0
)
tmToTime(x)
=> 793561559
Related Topics
Return to top