aboutsummaryrefslogtreecommitdiff
path: root/win32/strptime.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* win32: changes to allow timezones in datesRon Yorston2021-09-171-5/+32
| | | | | | | | | | | | | | 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.
* win32: update strptime(3) implementationRon Yorston2020-08-031-12/+19
| | | | | | | | | | Update to latest code from gnulib. This adds a '%q' (quarter) field descriptor. Remove the 'neg' variable from the code to handle the '%z' (timezone) field descriptor. Since our struct tm lacks a tm_gmtoff member '%z' is only supported "for reasons of symmetry". Since the computed value is never used there's no need to negate it.
* win32: reduce size of strptime()Ron Yorston2020-02-161-74/+8
| | | | | | | | Our implementation of strptime() doesn't support alternative number formats. Rather than duplicate the code for the affected conversion specifications just return to the start of the switch statement. Saves 256 bytes.
* win32/strptime: fix for negative timezonesJohannes Schindelin2017-08-231-0/+2
| | | | | | | I bet this has been fixed in gnulib, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Ron Yorston <rmy@pobox.com>
* win32/strptime: avoid old-style declarationsJohannes Schindelin2017-08-231-19/+5
| | | | | | | | This was inherited from gnulib. While at it, get rid of the ugly (and unneeded) LOCALE constants. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Ron Yorston <rmy@pobox.com>
* win32/strptime: ensure that strptime()/localtime_r() are declaredJohannes Schindelin2017-08-231-0/+1
| | | | | | | | | | When `#include`ing libbb.h, it implicitly includes mingw.h (with a prototype for strptime()) and it also defines _POSIX_THREAD_SAFE_FUNCTIONS so that the time.h header declares localtime_r(). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Ron Yorston <rmy@pobox.com>
* win32: use emulated localtime_r in strptimeRon Yorston2014-01-211-3/+1
|
* win32: use strptime from gnulibRon Yorston2014-01-201-0/+648