/bionic/tests/ |
D | time_test.cpp | 64 tm* broken_down = gmtime(&t); in TEST() 75 struct tm tm = {}; in TEST() local 77 struct tm* broken_down = gmtime_r(&t, &tm); in TEST() 78 ASSERT_EQ(broken_down, &tm); in TEST() 88 struct tm tm = {.tm_year = 70, .tm_mon = 0, .tm_mday = 1}; in TEST() local 94 ASSERT_EQ(static_cast<time_t>(8 * 60 * 60), mktime(&tm)); in TEST() 126 struct tm t; in TEST() 127 memset(&t, 0, sizeof(tm)); in TEST() 136 memset(&t, 0, sizeof(tm)); in TEST() 147 struct tm tm = {.tm_year = 2100 - 1900, .tm_mon = 2, .tm_mday = 10}; in TEST() local [all …]
|
D | wchar_test.cpp | 577 struct tm t; in TEST() 578 memset(&t, 0, sizeof(tm)); in TEST()
|
/bionic/libc/tzcode/ |
D | strptime.c | 86 static int epoch_to_tm(const unsigned char **, struct tm *); 88 static char *_strptime(const char *, const char *, struct tm *, int); 94 strptime(const char *buf, const char *fmt, struct tm *tm) in strptime() argument 96 return(_strptime(buf, fmt, tm, 1)); in strptime() 101 _strptime(const char *buf, const char *fmt, struct tm *tm, int initialize) in _strptime() argument 161 if (!(bp = _strptime(bp, _ctloc(d_t_fmt), tm, 0))) in _strptime() 167 if (!(bp = _strptime(bp, "%m/%d/%y", tm, 0))) in _strptime() 173 if (!(bp = _strptime(bp, "%Y-%m-%d", tm, 0))) in _strptime() 179 if (!(bp = _strptime(bp, "%H:%M", tm, 0))) in _strptime() 185 if (!(bp = _strptime(bp, "%I:%M:%S %p", tm, 0))) in _strptime() [all …]
|
D | private.h | 508 char *asctime(struct tm const *); 509 char *asctime_r(struct tm const *restrict, char *restrict); 514 struct tm const *restrict); 517 struct tm const *restrict, locale_t); 519 struct tm *gmtime(time_t const *); 520 struct tm *gmtime_r(time_t const *restrict, struct tm *restrict); 521 struct tm *localtime(time_t const *); 522 struct tm *localtime_r(time_t const *restrict, struct tm *restrict); 523 time_t mktime(struct tm *); 529 extern char *asctime_r(struct tm const *restrict, char *restrict); [all …]
|
D | localtime.c | 158 static struct tm *gmtsub(struct state const *, time_t const *, int_fast32_t, 159 struct tm *); 164 static struct tm *timesub(time_t const *, int_fast32_t, struct state const *, 165 struct tm *); 196 static struct tm tm; variable 1565 static struct tm * 1567 struct tm *const tmp) in localsub() 1571 register struct tm * result; in localsub() 1652 struct tm * 1653 localtime_rz(struct state *sp, time_t const *timep, struct tm *tmp) in localtime_rz() [all …]
|
D | strftime.c | 126 static char * _fmt(const char *, const struct tm *, char *, const char *, 136 strftime_l(char *s, size_t maxsize, char const *format, struct tm const *t, in strftime_l() 147 strftime(char *s, size_t maxsize, const char *format, const struct tm *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() 377 struct tm tm; in _fmt() local 381 tm = *t; in _fmt() [all …]
|
D | asctime.c | 70 asctime_r(register const struct tm *timeptr, char *buf) in asctime_r() 119 asctime(register const struct tm *timeptr) in asctime()
|
/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 | 50 char* _Nullable asctime64(const struct tm* _Nonnull); 51 char* _Nullable asctime64_r(const struct tm* _Nonnull, char* _Nonnull); 54 struct tm* _Nullable gmtime64(const time64_t* _Nonnull); 55 struct tm* _Nullable gmtime64_r(const time64_t* _Nonnull, struct tm* _Nonnull); 56 struct tm* _Nullable localtime64(const time64_t* _Nonnull); 57 struct tm* _Nullable localtime64_r(const time64_t* _Nonnull, struct tm* _Nonnull); 58 time64_t mktime64(const struct tm* _Nonnull); 59 time64_t timegm64(const struct tm* _Nonnull); 60 time64_t timelocal64(const struct tm* _Nonnull);
|
D | time.h | 46 struct tm { struct 65 char* _Nullable asctime(const struct tm* _Nonnull __tm); 66 char* _Nullable asctime_r(const struct tm* _Nonnull __tm, char* _Nonnull __buf); 69 time_t mktime(struct tm* _Nonnull __tm); 71 struct tm* _Nullable localtime(const time_t* _Nonnull __t); 72 struct tm* _Nullable localtime_r(const time_t* _Nonnull __t, struct tm* _Nonnull __tm); 74 struct tm* _Nullable gmtime(const time_t* _Nonnull __t); 75 struct tm* _Nullable gmtime_r(const time_t* _Nonnull __t, struct tm* _Nonnull __tm); 77 char* _Nullable strptime(const char* _Nonnull __s, const char* _Nonnull __fmt, struct tm* _Nonnull … 78 char* _Nullable strptime_l(const char* _Nonnull __s, const char* _Nonnull __fmt, struct tm* _Nonnul… [all …]
|
D | wchar.h | 83 …har_t* _Nonnull __buf, size_t __n, const wchar_t* _Nullable __fmt, const struct tm* _Nonnull __tm); 84 …* _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()
|
D | wchar_l.cpp | 44 size_t wcsftime_l(wchar_t* buf, size_t n, const wchar_t* fmt, const struct tm* tm, locale_t) { in wcsftime_l() argument 45 return wcsftime(buf, n, fmt, tm); in wcsftime_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-openbsd/lib/libc/time/ |
D | wcsftime.c | 107 static wchar_t * _fmt(const wchar_t *, const struct tm *, wchar_t *, const wchar_t *, 120 const wchar_t *__restrict format, const struct tm *__restrict t) in wcsftime() 138 _fmt(const wchar_t *format, const struct tm *t, wchar_t *pt, in _fmt() 288 struct tm tm; in _fmt() local 293 tm = *t; in _fmt() 294 mkt = mktime(&tm); in _fmt()
|
/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 | 269 // The name of the tm_gmtoff field in our struct tm.
|