1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

(scm_strptime): Add comment about glibc strptime %s and

current timezone requiring SCM_DEFER_INTS.
This commit is contained in:
Kevin Ryde 2003-09-03 00:01:17 +00:00
parent 90a5894d05
commit 03b79aa32a

View file

@ -647,6 +647,9 @@ SCM_DEFINE (scm_strptime, "strptime", 2, 0, 0,
tm_init (tm_yday); tm_init (tm_yday);
#undef tm_init #undef tm_init
/* GNU glibc strptime() "%s" is affected by the current timezone, since it
reads a UTC time_t value and converts with localtime_r() to set the tm
fields, hence the use of SCM_DEFER_INTS. */
t.tm_isdst = -1; t.tm_isdst = -1;
SCM_DEFER_INTS; SCM_DEFER_INTS;
if ((rest = strptime (str, fmt, &t)) == NULL) if ((rest = strptime (str, fmt, &t)) == NULL)