- #include <stdio.h>
- #include <time.h>
- #include <systimeb.h>
- void main(void)
- {
- struct timeb timezone;
- tzset();
- ftime(&timezone);
- printf("Seconds since 1 January 1970 (GMT) %ldn",
- timezone.time);
- printf("Fractional seconds %dn", timezone.millitm);
- printf("Hours difference between GMT and local zone %dn",
- timezone.timezone / 60);
- if (timezone.dstflag)
- printf("Daylight savings time activen");
- else
- printf("Daylight savings time inactiven");
- }