An example of what I'm trying to say:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
int main(void)
{
TIME_ZONE_INFORMATION tzi;
switch (GetTimeZoneInformation(&tzi))
{
case TIME_ZONE_ID_DAYLIGHT:
/* Windows 9x/ME/NT/2000/XP - The current time zone is on Daylight Saving Time */
printf("GetTimeZoneInformation() returned TIME_ZONE_ID_DAYLIGHT:\n");
printf("Bias: %ld\n", tzi.Bias);
printf("DaylightName: %ls\n", tzi.DaylightName); /* This is a Unicode string */
printf("DaylightBias: %ld\n", tzi.DaylightBias);
break;
case TIME_ZONE_ID_STANDARD:
/* Windows NT/2000/XP - the current time zone is on Standard Time */
/* Windows 9x/ME - The current time zone does not use Daylight Saving Time or
the current time zone is on Standard Time */
printf("GetTimeZoneInformation() returned TIME_ZONE_ID_STANDARD:\n");
printf("Bias: %ld\n", tzi.Bias);
printf("StandardName: %ls\n", tzi.StandardName); /* This is a Unicode string */
printf("StandardBias: %ld\n", tzi.StandardBias);
break;
case TIME_ZONE_ID_UNKNOWN:
/* Windows NT/2000/XP - The current time zone does not use Daylight Saving Time */
printf("GetTimeZoneInformation() returned TIME_ZONE_ID_UNKNOWN:\n");
printf("Bias: %ld\n", tzi.Bias);
printf("StandardName: %ls\n", tzi.StandardName); /* This is a Unicode string */
printf("StandardBias: %ld\n", tzi.StandardBias);
break;
case TIME_ZONE_ID_INVALID:
printf("Error calling GetTimeZoneInformation()\n");
break;
default:
printf("GetTimeZoneInformation() returned unknown value\n");
break;
}
return 0;
}