| 107 | #include <stdio.h> |
| 108 | |
| 109 | int main(void) { |
| 110 | /* Obtain timezone and daylight info. */ |
| 111 | tzset(); /* Now 'timezome' global is populated. */ |
| 112 | time_t t = time(NULL); |
| 113 | struct tm *aux = localtime(&t); |
| 114 | int daylight_active = aux->tm_isdst; |
| 115 | |
| 116 | struct tm tm; |
| 117 | char buf[1024]; |
| 118 | |
| 119 | nolocks_localtime(&tm,t,timezone,daylight_active); |
| 120 | strftime(buf,sizeof(buf),"%d %b %H:%M:%S",&tm); |
| 121 | printf("[timezone: %d, dl: %d] %s\n", (int)timezone, (int)daylight_active, buf); |
| 122 | } |
| 123 | #endif |
nothing calls this directly
no test coverage detected