/bionic/tests/ |
D | time_test.cpp | 67 tm* broken_down = gmtime(&t); in TEST() 78 struct tm tm = {}; in TEST() local 80 struct tm* broken_down = gmtime_r(&t, &tm); in TEST() 81 ASSERT_EQ(broken_down, &tm); in TEST() 91 struct tm tm = {.tm_year = 70, .tm_mon = 0, .tm_mday = 1}; in TEST() local 97 ASSERT_EQ(static_cast<time_t>(8 * 60 * 60), mktime(&tm)); in TEST() 129 struct tm t; in TEST() 130 memset(&t, 0, sizeof(tm)); in TEST() 139 memset(&t, 0, sizeof(tm)); in TEST() 150 struct tm tm = {.tm_year = 2100 - 1900, .tm_mon = 2, .tm_mday = 10}; in TEST() local [all …]
|
D | wchar_test.cpp | 662 struct tm t; in TEST() 663 memset(&t, 0, sizeof(tm)); in TEST()
|
/bionic/libc/tzcode/ |
D | strptime.c | 87 static int epoch_to_tm(const unsigned char **, struct tm *); 89 static char *_strptime(const char *, const char *, struct tm *, int); 95 strptime(const char *buf, const char *fmt, struct tm *tm) in strptime() argument 97 return(_strptime(buf, fmt, tm, 1)); in strptime() 102 _strptime(const char *buf, const char *fmt, struct tm *tm, int initialize) in _strptime() argument 162 if (!(bp = _strptime(bp, _ctloc(d_t_fmt), tm, 0))) in _strptime() 168 if (!(bp = _strptime(bp, "%m/%d/%y", tm, 0))) in _strptime() 174 if (!(bp = _strptime(bp, "%Y-%m-%d", tm, 0))) in _strptime() 180 if (!(bp = _strptime(bp, "%H:%M", tm, 0))) in _strptime() 186 if (!(bp = _strptime(bp, "%I:%M:%S %p", tm, 0))) in _strptime() [all …]
|
D | strftime.c | 124 static char * _fmt(const char *, const struct tm *, char *, const char *, 135 struct tm const *restrict t, in strftime_l() 147 struct tm const *restrict t) in strftime() 195 static const char* _safe_tm_zone(const struct tm* tm) { in _safe_tm_zone() argument 196 const char* zone = tm->TM_ZONE; in _safe_tm_zone() 201 if (tm->tm_isdst == 0) { in _safe_tm_zone() 203 } else if (tm->tm_isdst > 0) { in _safe_tm_zone() 217 _fmt(const char *format, const struct tm *t, char *pt, in _fmt() 379 struct tm tm; in _fmt() local 383 tm.tm_sec = t->tm_sec; in _fmt() [all …]
|
D | private.h | 679 DEPRECATED_IN_C23 char *asctime(struct tm const *); 680 char *asctime_r(struct tm const *restrict, char *restrict); 685 struct tm const *restrict); 688 struct tm const *restrict, locale_t); 690 struct tm *gmtime(time_t const *); 691 struct tm *gmtime_r(time_t const *restrict, struct tm *restrict); 692 struct tm *localtime(time_t const *); 693 struct tm *localtime_r(time_t const *restrict, struct tm *restrict); 694 time_t mktime(struct tm *); 696 time_t timegm(struct tm *); [all …]
|
D | asctime.c | 64 asctime_r(struct tm const *restrict timeptr, char *restrict buf) in asctime_r() 114 asctime(register const struct tm *timeptr) in asctime() 122 struct tm mytm; in ctime_r() 123 struct tm *tmp = localtime_r(timep, &mytm); in ctime_r()
|
D | localtime.c | 147 static struct tm *gmtsub(struct state const *, time_t const *, int_fast32_t, 148 struct tm *); 153 static struct tm *timesub(time_t const *, int_fast32_t, struct state const *, 154 struct tm *); 189 static struct tm tm; variable 1564 static struct tm * 1566 struct tm *const tmp) in localsub() 1570 register struct tm * result; in localsub() 1660 struct tm * 1662 struct tm *restrict tmp) in localtime_rz() [all …]
|
/bionic/tests/headers/posix/ |
D | time_h.c | 47 TYPE(struct tm); in time_h() 48 STRUCT_MEMBER(struct tm, int, tm_sec); in time_h() 49 STRUCT_MEMBER(struct tm, int, tm_min); in time_h() 50 STRUCT_MEMBER(struct tm, int, tm_hour); in time_h() 51 STRUCT_MEMBER(struct tm, int, tm_mday); in time_h() 52 STRUCT_MEMBER(struct tm, int, tm_mon); in time_h() 53 STRUCT_MEMBER(struct tm, int, tm_year); in time_h() 54 STRUCT_MEMBER(struct tm, int, tm_wday); in time_h() 55 STRUCT_MEMBER(struct tm, int, tm_yday); in time_h() 56 STRUCT_MEMBER(struct tm, int, tm_isdst); in time_h() [all …]
|
D | wchar_h.c | 88 FUNCTION(wcsftime, size_t (*f)(wchar_t*, size_t, const wchar_t*, const struct tm*)); in wchar_h()
|
/bionic/libc/include/ |
D | time64.h | 47 char* _Nullable asctime64(const struct tm* _Nonnull); 48 char* _Nullable asctime64_r(const struct tm* _Nonnull, char* _Nonnull); 51 struct tm* _Nullable gmtime64(const time64_t* _Nonnull); 52 struct tm* _Nullable gmtime64_r(const time64_t* _Nonnull, struct tm* _Nonnull); 53 struct tm* _Nullable localtime64(const time64_t* _Nonnull); 54 struct tm* _Nullable localtime64_r(const time64_t* _Nonnull, struct tm* _Nonnull); 55 time64_t mktime64(const struct tm* _Nonnull); 56 time64_t timegm64(const struct tm* _Nonnull); 57 time64_t timelocal64(const struct tm* _Nonnull);
|
D | time.h | 74 struct tm { struct 130 char* _Nullable asctime(const struct tm* _Nonnull __tm); 140 char* _Nullable asctime_r(const struct tm* _Nonnull __tm, char* _Nonnull __buf); 159 time_t mktime(struct tm* _Nonnull __tm); 169 time_t mktime_z(timezone_t _Nonnull __tz, struct tm* _Nonnull __tm) __INTRODUCED_IN(35); 180 struct tm* _Nullable localtime(const time_t* _Nonnull __t); 192 struct tm* _Nullable localtime_r(const time_t* _Nonnull __t, struct tm* _Nonnull __tm); 203 struct tm* _Nullable localtime_rz(timezone_t _Nonnull __tz, const time_t* _Nonnull __t, struct tm* … 208 time_t timelocal(struct tm* _Nonnull __tm); 219 struct tm* _Nullable gmtime(const time_t* _Nonnull __t); [all …]
|
D | wchar.h | 85 …har_t* _Nonnull __buf, size_t __n, const wchar_t* _Nullable __fmt, const struct tm* _Nonnull __tm); 86 …* _Nonnull __buf, size_t __n, const wchar_t* _Nullable __fmt, const struct tm* _Nonnull __tm, loca…
|
/bionic/libc/bionic/ |
D | time64.c | 77 #define TM tm 245 static int check_tm(struct TM *tm) in check_tm() argument 248 assert(tm->tm_sec >= 0); in check_tm() 249 assert(tm->tm_sec <= 61); in check_tm() 251 assert(tm->tm_min >= 0); in check_tm() 252 assert(tm->tm_min <= 59); in check_tm() 254 assert(tm->tm_hour >= 0); in check_tm() 255 assert(tm->tm_hour <= 23); in check_tm() 257 assert(tm->tm_mday >= 1); in check_tm() 258 assert(tm->tm_mday <= days_in_month[IS_LEAP(tm->tm_year)][tm->tm_mon]); in check_tm() [all …]
|
D | time_l.cpp | 32 char* strptime_l(const char* buf, const char* fmt, struct tm* tm, locale_t) { in strptime_l() argument 33 return strptime(buf, fmt, tm); in strptime_l()
|
/bionic/benchmarks/ |
D | time_benchmark.cpp | 200 struct tm tm; in BM_time_localtime_r() local 201 localtime_r(&t, &tm); in BM_time_localtime_r() 209 struct tm* tm = gmtime(&t); in BM_time_strftime() local 211 strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", tm); in BM_time_strftime()
|
/bionic/libc/upstream-freebsd/lib/libc/locale/ |
D | wcsftime.c | 59 const wchar_t * __restrict format, const struct tm * __restrict timeptr, in wcsftime_l() 121 const wchar_t * __restrict format, const struct tm * __restrict timeptr) in wcsftime()
|
/bionic/libc/dns/resolv/ |
D | res_debug.c | 1183 struct tm *mytime; in p_secstodate() 1185 struct tm res; in p_secstodate()
|
/bionic/libc/ |
D | Android.bp | 258 // The name of the tm_gmtoff field in our struct tm.
|