Lines Matching refs:timestruct
46 SysTime SysTimeFromTimeStruct(struct tm* timestruct, bool is_local) { in SysTimeFromTimeStruct() argument
49 return mktime64(timestruct); in SysTimeFromTimeStruct()
51 return timegm64(timestruct); in SysTimeFromTimeStruct()
54 void SysTimeToTimeStruct(SysTime t, struct tm* timestruct, bool is_local) { in SysTimeToTimeStruct() argument
57 localtime64_r(&t, timestruct); in SysTimeToTimeStruct()
59 gmtime64_r(&t, timestruct); in SysTimeToTimeStruct()
88 SysTime SysTimeFromTimeStruct(struct tm* timestruct, bool is_local) { in SysTimeFromTimeStruct() argument
91 return mktime(timestruct); in SysTimeFromTimeStruct()
93 return aix_timegm(timestruct); in SysTimeFromTimeStruct()
96 void SysTimeToTimeStruct(SysTime t, struct tm* timestruct, bool is_local) { in SysTimeToTimeStruct() argument
99 localtime_r(&t, timestruct); in SysTimeToTimeStruct()
101 gmtime_r(&t, timestruct); in SysTimeToTimeStruct()
107 SysTime SysTimeFromTimeStruct(struct tm* timestruct, bool is_local) { in SysTimeFromTimeStruct() argument
110 return mktime(timestruct); in SysTimeFromTimeStruct()
112 return timegm(timestruct); in SysTimeFromTimeStruct()
115 void SysTimeToTimeStruct(SysTime t, struct tm* timestruct, bool is_local) { in SysTimeToTimeStruct() argument
118 localtime_r(&t, timestruct); in SysTimeToTimeStruct()
120 gmtime_r(&t, timestruct); in SysTimeToTimeStruct()
154 struct tm timestruct; in Explode() local
155 SysTimeToTimeStruct(seconds, ×truct, is_local); in Explode()
157 exploded->year = timestruct.tm_year + 1900; in Explode()
158 exploded->month = timestruct.tm_mon + 1; in Explode()
159 exploded->day_of_week = timestruct.tm_wday; in Explode()
160 exploded->day_of_month = timestruct.tm_mday; in Explode()
161 exploded->hour = timestruct.tm_hour; in Explode()
162 exploded->minute = timestruct.tm_min; in Explode()
163 exploded->second = timestruct.tm_sec; in Explode()
178 struct tm timestruct; in FromExploded() local
179 timestruct.tm_sec = exploded.second; in FromExploded()
180 timestruct.tm_min = exploded.minute; in FromExploded()
181 timestruct.tm_hour = exploded.hour; in FromExploded()
182 timestruct.tm_mday = exploded.day_of_month; in FromExploded()
183 timestruct.tm_mon = month.ValueOrDie(); in FromExploded()
184 timestruct.tm_year = year.ValueOrDie(); in FromExploded()
185 timestruct.tm_wday = exploded.day_of_week; // mktime/timegm ignore this in FromExploded()
186 timestruct.tm_yday = 0; // mktime/timegm ignore this in FromExploded()
187 timestruct.tm_isdst = -1; // attempt to figure it out in FromExploded()
189 timestruct.tm_gmtoff = 0; // not a POSIX field, so mktime/timegm ignore in FromExploded()
190 timestruct.tm_zone = nullptr; // not a POSIX field, so mktime/timegm ignore in FromExploded()
202 struct tm timestruct0 = timestruct; in FromExploded()
204 seconds = SysTimeFromTimeStruct(×truct, is_local); in FromExploded()
208 timestruct = timestruct0; in FromExploded()
209 timestruct.tm_isdst = 0; in FromExploded()
210 int64_t seconds_isdst0 = SysTimeFromTimeStruct(×truct, is_local); in FromExploded()
212 timestruct = timestruct0; in FromExploded()
213 timestruct.tm_isdst = 1; in FromExploded()
214 int64_t seconds_isdst1 = SysTimeFromTimeStruct(×truct, is_local); in FromExploded()