]> git.mxchange.org Git - flightgear.git/blob - src/Time/win32test.c
#346 related: missing status message for property server
[flightgear.git] / src / Time / win32test.c
1 #include <stdio.h>
2
3 #include <windows.h>
4 #include <Windows32/Structures.h>
5 #include <Windows32/Functions.h>
6
7 int main() {
8     SYSTEMTIME st;
9     TIME_ZONE_INFORMATION tzinfo;
10     DWORD t;
11     int i;
12
13     GetSystemTime(&st);
14     printf("System Time = %d %d %d %d %d %d %d %d\n", 
15            st.wYear,
16            st.wMonth,
17            st.wDayOfWeek,
18            st.wDay,
19            st.wHour,
20            st.wMinute,
21            st.wSecond,
22            st.wMilliseconds
23            );
24
25     t = GetTimeZoneInformation( &tzinfo );
26
27     printf("time zone info return = %d\n", t);
28
29     printf("Bias = %ld\n", tzinfo.Bias);
30
31     printf("Standard Name = ");
32     i = 0;
33     while ( tzinfo.StandardName[i] != 0 ) {
34         printf("%c", tzinfo.StandardName[i]);
35         i++;
36     }
37     printf("\n");
38
39     printf("System Time = %d %d %d %d %d %d %d %d\n", 
40            tzinfo.StandardDate.wYear,
41            tzinfo.StandardDate.wMonth,
42            tzinfo.StandardDate.wDayOfWeek,
43            tzinfo.StandardDate.wDay,
44            tzinfo.StandardDate.wHour,
45            tzinfo.StandardDate.wMinute,
46            tzinfo.StandardDate.wSecond,
47            tzinfo.StandardDate.wMilliseconds
48            );
49
50     printf("Standard Bias = %d\n", tzinfo.StandardBias);
51
52     printf("Daylight Name = ");
53     i = 0;
54     while ( tzinfo.DaylightName[i] != 0 ) {
55         printf("%c", tzinfo.DaylightName[i]);
56         i++;
57     }
58     printf("\n");
59
60     printf("Daylight Date = %d\n", tzinfo.DaylightDate);
61
62     printf("Daylight Bias = %ld\n", tzinfo.DaylightBias);
63
64     return(1);
65 }