A bit confused about DateTime.
This line should remove time from the date (eg. 12/22/2010 00:00:00)
However it shows 12/22/2010 09:00:00
which is my time zone = 9hrs
Likewise, the calculation of Julian Date should compensate for the time zone,
yet, this code results into the correct Julian Date without deducting the time zone:
So far fine, but if you monitor astronomical events in real-time, such as sunrise/set and moonrise/set the data won't change at midnight local time, but 9 hours later.
Does Android handle the time zone automatically?
Thanks and Cheers
Robert
This line should remove time from the date (eg. 12/22/2010 00:00:00)
B4X:
dt = DateTime.Now - DateTime.Now Mod DateTime.TicksPerDay
However it shows 12/22/2010 09:00:00
which is my time zone = 9hrs
Likewise, the calculation of Julian Date should compensate for the time zone,
yet, this code results into the correct Julian Date without deducting the time zone:
B4X:
jd = (DateTime.Now / DateTime.TicksPerDay + 2440587.5)
So far fine, but if you monitor astronomical events in real-time, such as sunrise/set and moonrise/set the data won't change at midnight local time, but 9 hours later.
Does Android handle the time zone automatically?
Thanks and Cheers
Robert