The format_date function tries to fill the (non-POSIX) tm_zone field
of struct tm, assuming the corresponding argument is a string. By the scsh documentation, #f is allowed, too. So just use NULL in that case instead of raising an argument-type exception, as was the case previously.
This commit is contained in:
parent
6aa549d288
commit
0628b66c3e
|
@ -333,7 +333,8 @@ s48_value format_date(s48_value sch_fmt, s48_value sch_sec, s48_value sch_min,
|
|||
d.tm_isdst = (S48_EQ_P (sch_summer, S48_FALSE)) ? 0 : 1;
|
||||
|
||||
#ifdef HAVE_STRUCT_TM_TM_ZONE
|
||||
d.tm_zone = s48_extract_string(sch_tz); /* FreeBSD's strftime reads this */
|
||||
/* FreeBSD's strftime reads this */
|
||||
d.tm_zone = (S48_EQ_P(sch_tz, S48_FALSE)) ? NULL : s48_extract_string(sch_tz);
|
||||
#endif
|
||||
|
||||
/* Copy fmt -> fmt2, converting ~ escape codes to % escape codes.
|
||||
|
|
Loading…
Reference in New Issue