1 time_t timegm(struct tm *tm); 2 3 static inline time_t 4 __tm_to_secs(const struct tm *tm) 5 { 6 struct tm tmp = *tm; 7 return timegm(&tmp); 8 } 9 10 static inline const char* 11 __tm_to_tzname(const struct tm *tm) 12 { 13 const void *p = tm->tm_zone; 14 if (p) 15 return p; 16 if (tm->tm_isdst >= 0) 17 return tzname[tm->tm_isdst != 0]; 18 19 return ""; 20 } 21 22 #define __tm_gmtoff tm_gmtoff 23 #define __tm_zone tm_zone 24