| /third_party/ulib/musl/src/time/ |
| A D | strftime.c | 20 static int week_num(const struct tm* tm) { in week_num() argument 21 int val = (tm->tm_yday + 7U - (tm->tm_wday + 6U) % 7) / 7; in week_num() 24 if ((tm->tm_wday + 371U - tm->tm_yday - 2) % 7 <= 2) in week_num() 31 int dec31 = (tm->tm_wday + 7U - tm->tm_yday - 1) % 7; in week_num() 38 int jan1 = (tm->tm_wday + 371U - tm->tm_yday) % 7; in week_num() 96 if (tm->tm_yday < 3 && week_num(tm) != 1) in __strftime_fmt_1() 98 else if (tm->tm_yday > 360 && week_num(tm) == 1) in __strftime_fmt_1() 138 val = __tm_to_secs(tm) - tm->__tm_gmtoff; in __strftime_fmt_1() 151 val = tm->tm_wday ? tm->tm_wday : 7; in __strftime_fmt_1() 155 val = (tm->tm_yday + 7U - tm->tm_wday) / 7; in __strftime_fmt_1() [all …]
|
| A D | localtime_r.c | 5 struct tm* __gmtime_r(const time_t* restrict, struct tm* restrict); 7 struct tm* __localtime_r(const time_t* restrict t, struct tm* restrict tm) { in __localtime_r() argument 9 return __gmtime_r(t, tm); in __localtime_r() 17 __secs_to_zone(*t, 0, &tm->tm_isdst, &tm->__tm_gmtoff, 0, &tm->__tm_zone); in __localtime_r() 18 if (__secs_to_tm((long long)*t + tm->__tm_gmtoff, tm) < 0) { in __localtime_r() 22 return tm; in __localtime_r()
|
| A D | strptime.c | 9 char* strptime(const char* restrict s, const char* restrict f, struct tm* restrict tm) { in strptime() argument 37 dest = &tm->tm_wday; in strptime() 44 dest = &tm->tm_mon; in strptime() 61 dest = &tm->tm_mday; in strptime() 71 dest = &tm->tm_hour; in strptime() 76 dest = &tm->tm_hour; in strptime() 81 dest = &tm->tm_yday; in strptime() 86 dest = &tm->tm_mon; in strptime() 92 dest = &tm->tm_min; in strptime() 127 dest = &tm->tm_sec; in strptime() [all …]
|
| A D | __asctime.c | 7 char* __asctime(const struct tm* restrict tm, char* restrict buf) { in __asctime() argument 10 if (snprintf(buf, 26, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n", __nl_langinfo(ABDAY_1 + tm->tm_wday), in __asctime() 11 __nl_langinfo(ABMON_1 + tm->tm_mon), tm->tm_mday, tm->tm_hour, tm->tm_min, in __asctime() 12 tm->tm_sec, 1900 + tm->tm_year) >= 26) { in __asctime()
|
| A D | gmtime_r.c | 5 struct tm* __gmtime_r(const time_t* restrict t, struct tm* restrict tm) { in __gmtime_r() argument 6 if (__secs_to_tm(*t, tm) < 0) { in __gmtime_r() 10 tm->tm_isdst = 0; in __gmtime_r() 11 tm->__tm_gmtoff = 0; in __gmtime_r() 12 tm->__tm_zone = __gmt; in __gmtime_r() 13 return tm; in __gmtime_r()
|
| A D | timegm.c | 5 time_t timegm(struct tm* tm) { in timegm() argument 6 struct tm new; in timegm() 7 long long t = __tm_to_secs(tm); in timegm() 12 *tm = new; in timegm() 13 tm->tm_isdst = 0; in timegm() 14 tm->__tm_gmtoff = 0; in timegm() 15 tm->__tm_zone = __gmt; in timegm()
|
| A D | __secs_to_tm.c | 11 int __secs_to_tm(long long t, struct tm* tm) { in __secs_to_tm() argument 70 tm->tm_year = years + 100; in __secs_to_tm() 71 tm->tm_mon = months + 2; in __secs_to_tm() 72 if (tm->tm_mon >= 12) { in __secs_to_tm() 73 tm->tm_mon -= 12; in __secs_to_tm() 74 tm->tm_year++; in __secs_to_tm() 76 tm->tm_mday = remdays + 1; in __secs_to_tm() 77 tm->tm_wday = wday; in __secs_to_tm() 78 tm->tm_yday = yday; in __secs_to_tm() 80 tm->tm_hour = remsecs / 3600; in __secs_to_tm() [all …]
|
| A D | __tm_to_secs.c | 3 long long __tm_to_secs(const struct tm* tm) { in __tm_to_secs() argument 5 long long year = tm->tm_year; in __tm_to_secs() 6 int month = tm->tm_mon; in __tm_to_secs() 18 t += 86400LL * (tm->tm_mday - 1); in __tm_to_secs() 19 t += 3600LL * tm->tm_hour; in __tm_to_secs() 20 t += 60LL * tm->tm_min; in __tm_to_secs() 21 t += tm->tm_sec; in __tm_to_secs()
|
| A D | gmtime.c | 4 struct tm* __gmtime_r(const time_t* restrict, struct tm* restrict); 6 struct tm* gmtime(const time_t* t) { in gmtime() 7 static struct tm tm; in gmtime() local 8 return __gmtime_r(t, &tm); in gmtime()
|
| A D | localtime.c | 3 struct tm* __localtime_r(const time_t* restrict, struct tm* restrict); 5 struct tm* localtime(const time_t* t) { in localtime() 6 static struct tm tm; in localtime() local 7 return __localtime_r(t, &tm); in localtime()
|
| A D | mktime.c | 4 time_t mktime(struct tm* tm) { in mktime() argument 5 struct tm new; in mktime() 7 long long t = __tm_to_secs(tm); in mktime() 11 if (tm->tm_isdst >= 0 && new.tm_isdst != tm->tm_isdst) in mktime() 23 *tm = new; in mktime()
|
| A D | wcsftime.c | 7 const char* __strftime_fmt_1(char (*s)[100], size_t* l, int f, const struct tm* tm, locale_t loc); 10 const struct tm* restrict tm, locale_t loc) { in __wcsftime_l() argument 41 t_mb = __strftime_fmt_1(&buf, &k, *f, tm, loc); in __wcsftime_l() 52 if (plus && tm->tm_year >= 10000 - 1900) in __wcsftime_l() 54 else if (tm->tm_year < -1900) in __wcsftime_l() 75 const struct tm* restrict tm) { in wcsftime() argument 76 return __wcsftime_l(wcs, n, f, tm, CURRENT_LOCALE); in wcsftime()
|
| A D | ctime_r.c | 4 struct tm tm; in ctime_r() local 5 localtime_r(t, &tm); in ctime_r() 6 return asctime_r(&tm, buf); in ctime_r()
|
| A D | asctime.c | 3 char* asctime(const struct tm* tm) { in asctime() argument 5 return __asctime(tm, buf); in asctime()
|
| A D | asctime_r.c | 3 char* asctime_r(const struct tm* restrict tm, char* restrict buf) { in asctime_r() argument 4 return __asctime(tm, buf); in asctime_r()
|
| A D | time_impl.h | 8 char* __asctime(const struct tm* restrict, char* restrict) 14 long long __tm_to_secs(const struct tm*) ATTR_LIBC_VISIBILITY; 15 int __secs_to_tm(long long, struct tm*) ATTR_LIBC_VISIBILITY;
|
| A D | getdate.c | 8 struct tm* getdate(const char* s) { in getdate() 9 static struct tm tmbuf; in getdate() 10 struct tm* ret = 0; in getdate()
|
| A D | __tz.c | 460 const char* __tm_to_tzname(const struct tm* tm) { in __tm_to_tzname() argument 461 const void* p = tm->__tm_zone; in __tm_to_tzname()
|
| /third_party/ulib/musl/include/ |
| A D | time.h | 29 struct tm { struct 46 time_t mktime(struct tm*); 48 struct tm* gmtime(const time_t*); 49 struct tm* localtime(const time_t*); 50 char* asctime(const struct tm*); 61 struct tm* gmtime_r(const time_t* __restrict, struct tm* __restrict); 62 struct tm* localtime_r(const time_t* __restrict, struct tm* __restrict); 63 char* asctime_r(const struct tm* __restrict, char* __restrict); 105 char* strptime(const char* __restrict, const char* __restrict, struct tm* __restrict); 110 struct tm* getdate(const char*); [all …]
|
| A D | wchar.h | 132 struct tm; 134 const struct tm* __restrict);
|
| /third_party/ulib/musl/src/misc/ |
| A D | syslog.c | 75 struct tm tm; in _vsyslog() local 90 gmtime_r(&now, &tm); in _vsyslog() 91 strftime(timebuf, sizeof timebuf, "%b %e %T", &tm); in _vsyslog()
|
| /third_party/uapp/mkfs-msdosfs/ |
| A D | mkfs_msdos.c | 185 struct tm* tm; in mkfs_msdos() local 494 tm = gmtime(&now); in mkfs_msdos() 498 tm = localtime(&now); in mkfs_msdos() 561 x = (((uint32_t)(1 + tm->tm_mon) << 8 | (uint32_t)tm->tm_mday) + in mkfs_msdos() 562 ((uint32_t)tm->tm_sec << 8 | (uint32_t)(tv.tv_usec / 10))) in mkfs_msdos() 564 ((uint32_t)(1900 + tm->tm_year) + in mkfs_msdos() 565 ((uint32_t)tm->tm_hour << 8 | (uint32_t)tm->tm_min)); in mkfs_msdos() 601 x = (uint32_t)tm->tm_hour << 11 | (uint32_t)tm->tm_min << 5 | in mkfs_msdos() 602 (uint32_t)tm->tm_sec >> 1; in mkfs_msdos() 604 x = (uint32_t)(tm->tm_year - 80) << 9 | in mkfs_msdos() [all …]
|
| /third_party/lib/acpica/source/compiler/ |
| A D | aslcompile.c | 447 struct tm *NewTime; in AslCompilerFileHeader()
|
| /third_party/ulib/musl/ |
| A D | WHATSNEW | 838 - time_t/struct tm conversion off-by-one-day in december 1040 - strftime could crash if the struct tm did not have valid tm_zone field 1576 - negated tm_gmtoff field in struct tm 1614 - strftime mishandling of out-of-range struct tm members
|