diff options
| author | 2023-01-28 17:49:02 +0100 | |
|---|---|---|
| committer | 2023-01-28 17:49:02 +0100 | |
| commit | 876bebd9ac904ca930117237edaf8c3dcae7a922 (patch) | |
| tree | 7e91e26c49e18fd80c7de93ff275ffce83fb14df /xs_time.h | |
| parent | Bumped version. (diff) | |
| download | penes-snac2-876bebd9ac904ca930117237edaf8c3dcae7a922.tar.gz penes-snac2-876bebd9ac904ca930117237edaf8c3dcae7a922.tar.xz penes-snac2-876bebd9ac904ca930117237edaf8c3dcae7a922.zip | |
Backport from xs.
Diffstat (limited to 'xs_time.h')
| -rw-r--r-- | xs_time.h | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <time.h> | 7 | #include <time.h> |
| 8 | 8 | ||
| 9 | d_char *xs_str_time(time_t t, const char *fmt, int local); | 9 | xs_str *xs_str_time(time_t t, const char *fmt, int local); |
| 10 | #define xs_str_localtime(t, fmt) xs_str_time(t, fmt, 1) | 10 | #define xs_str_localtime(t, fmt) xs_str_time(t, fmt, 1) |
| 11 | #define xs_str_utctime(t, fmt) xs_str_time(t, fmt, 0) | 11 | #define xs_str_utctime(t, fmt) xs_str_time(t, fmt, 0) |
| 12 | time_t xs_parse_time(const char *str, const char *fmt, int local); | 12 | time_t xs_parse_time(const char *str, const char *fmt, int local); |
| @@ -15,8 +15,8 @@ time_t xs_parse_time(const char *str, const char *fmt, int local); | |||
| 15 | 15 | ||
| 16 | #ifdef XS_IMPLEMENTATION | 16 | #ifdef XS_IMPLEMENTATION |
| 17 | 17 | ||
| 18 | d_char *xs_str_time(time_t t, const char *fmt, int local) | 18 | xs_str *xs_str_time(time_t t, const char *fmt, int local) |
| 19 | /* returns a d_char with a formated time */ | 19 | /* returns a string with a formated time */ |
| 20 | { | 20 | { |
| 21 | struct tm tm; | 21 | struct tm tm; |
| 22 | char tmp[64]; | 22 | char tmp[64]; |