- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- void main(void)
- {
- putenv("TZ=PST8PDT");
- tzset();
- printf("Current time zone is %sn", tzname[0]);
- if (tzname[1])
- printf("Daylight savings zone is %sn", tzname[1]);
- else
- printf("Daylight savings zone is not definedn");
- }