Last active
August 29, 2015 14:22
-
-
Save shichao-an/6be4fa71d74422d28709 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <time.h> | |
struct tm *gmtime(const time_t *calptr); | |
struct tm *localtime(const time_t *calptr); | |
/* Both return: pointer to broken-down time, NULL on error */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <time.h> | |
time_t mktime(struct tm *tmptr); | |
Returns: calendar time if OK, −1 on error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <time.h> | |
size_t strftime(char *restrict buf, size_t maxsize, | |
const char *restrict format, | |
const struct tm *restrict tmptr); | |
size_t strftime_l(char *restrict buf, size_t maxsize, | |
const char *restrict format, | |
const struct tm *restrict tmptr, locale_t locale); | |
/* Both return: number of characters stored in array if room, 0 otherwise */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <time.h> | |
char *strptime(const char *restrict buf, const char *restrict format, | |
struct tm *restrict tmptr); | |
/* Returns: pointer to one character past last character parsed, NULL otherwise */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment