I've been looking at all the DateTime related posts and tutorials but I somehow can't figure out a way to calculate/get the true GMT time.
Most examples use:
But this does not take DST into account. I live in Holland and our timezone is GMT+1, but not during the somertime then it is GMT+2.
When I set the timezone in my emulator, it tells me "Amsterdam, Berlin" is now GMT+2:00, which is correct (Timezone + DST). But the code above reports 10:00 when the local time here is 11:00. It should be 09:00 as that is the local time minus 2 hours. What am I missing here?
Most examples use:
B4X:
Dim timezone As Long
timezone = -DateTime.DateParse("01/01/1970")
Msgbox(DateTime.Time(DateTime.Now - timezone),"")
But this does not take DST into account. I live in Holland and our timezone is GMT+1, but not during the somertime then it is GMT+2.
When I set the timezone in my emulator, it tells me "Amsterdam, Berlin" is now GMT+2:00, which is correct (Timezone + DST). But the code above reports 10:00 when the local time here is 11:00. It should be 09:00 as that is the local time minus 2 hours. What am I missing here?