Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
terekgabor Senior Member Joined: 02/01/2026 Location: HungaryPosts: 161
Posted: 04:43pm 01 Nov 2026
Copy link to clipboard
Print this post
Hello Everybody,
I am using ASTRO command to get moonrise and moonset moments in a program. I found when I set the correct time and date (for example 01-11-2026 17:00:00) I get the moonset and moonrise value 1 hour less then the real. Now in Hungary UTC+1. Does it mean ASTRO is calculating in UTC? But anyway I set the right GPS coordinates and local time in LOCATION command. Same for sunset and sunrise. May I miss something?
G@bor
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12101
Posted: 07:32pm 01 Nov 2026
Copy link to clipboard
Print this post
ASTRO works in UTC. The time you give LOCATION is taken as UTC (Universal Time), not local time, because the sidereal time the calculation needs is defined from UTC. In Hungary (UTC+1 now, UTC+2 in summer), 17:00 local is 16:00 UTC. If you give LOCATION 17:00, ASTRO calculates the sky for 18:00 your time, so every rise or set time you find comes out one hour early.
Convert to UTC before LOCATION, and back again for the results:
tz = 1 ' hours ahead of UTC: 1 in winter, 2 in summer t = Epoch("01-11-2026 17:00:00") - tz * 3600 Location DateTime$(t), 47.50, 19.04 ' Budapest: latitude, longitude (East positive) Astro Moon alt, az When your search finds the moment the altitude crosses the horizon, add tz * 3600 to that epoch time and pass it to DateTime$ to get the local time.
Make sure the longitude is positive for East. The documentation didn't say the time must be UTC; it will in the next release.
terekgabor Senior Member Joined: 02/01/2026 Location: HungaryPosts: 161
Posted: 07:54pm 01 Nov 2026
Copy link to clipboard
Print this post
Thank you Peter! Now it’s clear.
G@bor
terekgabor Senior Member Joined: 02/01/2026 Location: HungaryPosts: 161
Posted: 08:00pm 01 Nov 2026
Copy link to clipboard
Print this post
Is it the same with STAR? (If I have GPS signal live.)
G@bor
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12101
Posted: 10:39pm 01 Nov 2026
Copy link to clipboard
Print this post
STAR takes no time argument. It always uses the GPS's own UTC time, the copy saved before the OPEN … AS GPS offset is applied