B4X:
DateTime.SetTimeZone(0)
DateTime.DateFormat = "yyyy-MM-dd'T'HH:mm:ss'Z'"
Dim now As Long
now = DateTime.now
Log("The date is: " & DateTime.Date(now))
With the above code I'm getting the time in UTC. But somewhere I read like we shouldn't set SetTimeZone() to zero.
So which is the correct way to get the time in UTC.
Current time
B4X:
2015-10-06T13:29:32Z
Time in UTC
B4X:
2015-10-06T09:29:32Z