aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-09-17 09:18:58 +0100
committerRon Yorston <rmy@pobox.com>2021-09-17 11:41:25 +0100
commit9e16eecc70020e9a603d637f6a8fdfc7c95c30e1 (patch)
tree5700c068c09ad6028551449c2c9deac13b5c3b32 /include
parent46299d0c4f4c9a4bbad38bbbe26f196e1bccdc52 (diff)
downloadbusybox-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.h3
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
275time_t timegm(struct tm *tm);
276
275int nanosleep(const struct timespec *req, struct timespec *rem); 277int 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);
402struct tm *gmtime_r(const time_t *timep, struct tm *result); 404struct tm *gmtime_r(const time_t *timep, struct tm *result);
403struct tm *localtime_r(const time_t *timep, struct tm *result); 405struct tm *localtime_r(const time_t *timep, struct tm *result);
404char *strptime(const char *s, const char *format, struct tm *tm); 406char *strptime(const char *s, const char *format, struct tm *tm);
407char *mingw_strptime(const char *s, const char *format, struct tm *tm, long *gmt);
405size_t mingw_strftime(char *buf, size_t max, const char *format, const struct tm *tm); 408size_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