]> git.proxmox.com Git - wasi-libc.git/commitdiff
Re-enable '%s' in strftime.
authorDan Gohman <sunfish@mozilla.com>
Thu, 9 May 2019 05:29:34 +0000 (22:29 -0700)
committerDan Gohman <sunfish@mozilla.com>
Thu, 9 May 2019 16:07:38 +0000 (09:07 -0700)
This was commented out earlier when timezone handling was more in flux,
but it's ok to minimally support this now.

This fixes src/functional/strftime.c in libc-test.

libc-top-half/musl/src/time/strftime.c

index 949fede83cfc0fa6f00d76817cd964a01532d2bc..cc53d5369ca717900ef5816ed7bdc400d149dc6b 100644 (file)
@@ -122,12 +122,10 @@ const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *
        case 'R':
                fmt = "%H:%M";
                goto recu_strftime;
-#ifdef __wasilibc_unmodified_upstream // timezone data
        case 's':
                val = __tm_to_secs(tm) - tm->__tm_gmtoff;
                width = 1;
                goto number;
-#endif
        case 'S':
                val = tm->tm_sec;
                goto number;