Skip to content

Instantly share code, notes, and snippets.

@plicease
Created April 10, 2015 15:29
Show Gist options
  • Save plicease/2d94f6a876b19fbd47bb to your computer and use it in GitHub Desktop.
Save plicease/2d94f6a876b19fbd47bb to your computer and use it in GitHub Desktop.
struct tm interface
struct tm {
int tm_sec; /* seconds after the minute [0-60] */
int tm_min; /* minutes after the hour [0-59] */
int tm_hour; /* hours since midnight [0-23] */
int tm_mday; /* day of the month [1-31] */
int tm_mon; /* months since January [0-11] */
int tm_year; /* years since 1900 */
int tm_wday; /* days since Sunday [0-6] */
int tm_yday; /* days since January 1 [0-365] */
int tm_isdst; /* Daylight Savings Time flag */
long tm_gmtoff; /* offset from CUT in seconds */
char *tm_zone; /* timezone abbreviation */
};
struct tm *localtime(const time_t *timep);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment