time zone help


Licensed User
Longtime User
Hello community, using DateTime.Time (DateTime.Now) shows me 5 hours more than they really are. (I live in México).

When I try to use the example of Erel
Dim timezone As Long
timezone =-DateTime.DateParse ("01/01/1970")
TZTicks As Long Dim
TZTicks = 5 * DateTime.TicksPerHour - timezone

timezone take a value of 0, does not understand it, but I think it might be, because that date "01/01/1970" is the basis of calculations with dates and part of a zero.

so TZTicks shows a value of 18000000 in the same manner as if I had coded
TZTicks = 5 * DateTime.TicksPerHour (without timezone variable) what gives me the same result of 18000000
so in any way DateTime.Time (TZTicks) gives me 05:00:00

So the timezone variable in the example, has no effect, which is the result of multiplying the ticksperHour that are always 3600000 milliseconds which is one hour. by 5 to get me from 05:00:00 hours.

As the program I'm doing can run on different time zones, need then as I can determine the time considering the time zone and the schedule changes every six months?
That has to be done for both the emulator and for dipositive.
If anyone can guide me, it would be greatly appreciated.
Thank you.