X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=inline;f=src%2Ftime%2Fgmtime_r.c;h=8cbdadcb5d02164b845a7035dd68502ed794240b;hb=6fef8cafbd0f6f185897bc87feb1ff66e2e204e1;hp=0272870d6e46eb49019239bc8cd938aae7d40f93;hpb=1cc81f5cb0df2b66a795ff0c26d7bbc4d16e13c6;p=musl diff --git a/src/time/gmtime_r.c b/src/time/gmtime_r.c index 0272870d..8cbdadcb 100644 --- a/src/time/gmtime_r.c +++ b/src/time/gmtime_r.c @@ -2,15 +2,17 @@ #include #include "libc.h" +extern const char __gmt[]; + struct tm *__gmtime_r(const time_t *restrict t, struct tm *restrict tm) { if (__secs_to_tm(*t, tm) < 0) { - errno = EINVAL; + errno = EOVERFLOW; return 0; } tm->tm_isdst = 0; tm->__tm_gmtoff = 0; - tm->__tm_zone = "GMT"; + tm->__tm_zone = __gmt; return tm; }