diff options
author | Ron Yorston <rmy@pobox.com> | 2021-09-17 09:18:58 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2021-09-17 11:41:25 +0100 |
commit | 9e16eecc70020e9a603d637f6a8fdfc7c95c30e1 (patch) | |
tree | 5700c068c09ad6028551449c2c9deac13b5c3b32 /include | |
parent | 46299d0c4f4c9a4bbad38bbbe26f196e1bccdc52 (diff) | |
download | busybox-w32-9e16eecc70020e9a603d637f6a8fdfc7c95c30e1.tar.gz busybox-w32-9e16eecc70020e9a603d637f6a8fdfc7c95c30e1.tar.bz2 busybox-w32-9e16eecc70020e9a603d637f6a8fdfc7c95c30e1.zip |
win32: changes to allow timezones in dates
Create mingw_strptime() to return timezone offset as a separate
argument (since Microsoft's struct tm doesn't have the required
member).
Import timegm() from musl.
Update parse_datestr() to use mingw_strptime().
Enable FEATURE_TIMEZONE in the default configuration.
GitHub issue #230.
Diffstat (limited to 'include')
-rw-r--r-- | include/mingw.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/mingw.h b/include/mingw.h index 03ef89029..d48ad3814 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -272,6 +272,8 @@ struct timespec { | |||
272 | }; | 272 | }; |
273 | #endif | 273 | #endif |
274 | 274 | ||
275 | time_t timegm(struct tm *tm); | ||
276 | |||
275 | int nanosleep(const struct timespec *req, struct timespec *rem); | 277 | int nanosleep(const struct timespec *req, struct timespec *rem); |
276 | 278 | ||
277 | /* | 279 | /* |
@@ -402,6 +404,7 @@ pid_t mingw_wait3(pid_t pid, int *status, int options, struct rusage *rusage); | |||
402 | struct tm *gmtime_r(const time_t *timep, struct tm *result); | 404 | struct tm *gmtime_r(const time_t *timep, struct tm *result); |
403 | struct tm *localtime_r(const time_t *timep, struct tm *result); | 405 | struct tm *localtime_r(const time_t *timep, struct tm *result); |
404 | char *strptime(const char *s, const char *format, struct tm *tm); | 406 | char *strptime(const char *s, const char *format, struct tm *tm); |
407 | char *mingw_strptime(const char *s, const char *format, struct tm *tm, long *gmt); | ||
405 | size_t mingw_strftime(char *buf, size_t max, const char *format, const struct tm *tm); | 408 | size_t mingw_strftime(char *buf, size_t max, const char *format, const struct tm *tm); |
406 | 409 | ||
407 | #define strftime mingw_strftime | 410 | #define strftime mingw_strftime |