?
OK, hab was gefunden.
unsigned short Hour, Hour1, Min, Sec, MSec;
TTimeZoneInformation TZI;
TDateTime dtUTC;
TDateTime dtLocalTime = Now();
// UTC = local time + bias
switch ( GetTimeZoneInformation( &TZI ) )
{
case TIME_ZONE_ID_STANDARD:
dtUTC = dtLocalTime + (double)(TZI.Bias / 60.0 / 24.0); // Minutes per Day = 24 * 60
break;
case TIME_ZONE_ID_DAYLIGHT:
dtUTC = dtLocalTime + (double)(TZI.Bias / 60.0 / 24.0) + (double)TZI.DaylightBias;
break;
default:
throw "Error converting to UTC";
break;
}
dtUTC.DecodeTime( &Hour, &Min, &Sec, &MSec );
Label2->Caption = "UTC Zeit: " + IntToStr( Hour ) + ":" + IntToStr( Min );