X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Ftime%2Fstrftime.c;h=cc53d5369ca717900ef5816ed7bdc400d149dc6b;hb=34904d830a9fd1f6fc47218f38c111698303d2fe;hp=708875eeae52fc69be10418cd9fbdaa0e3e33a00;hpb=c7f0da4134d4e7f2efd295e7fb738c65c469fbd1;p=musl diff --git a/src/time/strftime.c b/src/time/strftime.c index 708875ee..cc53d536 100644 --- a/src/time/strftime.c +++ b/src/time/strftime.c @@ -6,11 +6,8 @@ #include #include #include "locale_impl.h" -#include "libc.h" #include "time_impl.h" -const char *__nl_langinfo_l(nl_item, locale_t); - static int is_leap(int y) { /* Avoid overflow */ @@ -45,9 +42,6 @@ static int week_num(const struct tm *tm) return val; } -const char *__tm_to_tzname(const struct tm *); -size_t __strftime_l(char *restrict, size_t, const char *restrict, const struct tm *restrict, locale_t); - const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *tm, locale_t loc, int pad) { nl_item item; @@ -181,9 +175,8 @@ const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm * *l = 0; return ""; } - *l = snprintf(*s, sizeof *s, "%+.2d%.2d", - (tm->__tm_gmtoff)/3600, - abs(tm->__tm_gmtoff%3600)/60); + *l = snprintf(*s, sizeof *s, "%+.4ld", + tm->__tm_gmtoff/3600*100 + tm->__tm_gmtoff%3600/60); return *s; case 'Z': if (tm->tm_isdst < 0) {