mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Update ATIS.lua
Fix time to be negative if early AM when using time to ZULU or time to GMT difference
This commit is contained in:
@@ -1318,6 +1318,10 @@ function ATIS:onafterBroadcast(From, Event, To)
|
|||||||
time=time-UTILS.GMTToLocalTimeDifference()*60*60
|
time=time-UTILS.GMTToLocalTimeDifference()*60*60
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if time < 0 then
|
||||||
|
time = 24*60*60 - time --avoid negative time around midnight
|
||||||
|
end
|
||||||
|
|
||||||
local clock=UTILS.SecondsToClock(time)
|
local clock=UTILS.SecondsToClock(time)
|
||||||
local zulu=UTILS.Split(clock, ":")
|
local zulu=UTILS.Split(clock, ":")
|
||||||
local ZULU=string.format("%s%s", zulu[1], zulu[2])
|
local ZULU=string.format("%s%s", zulu[1], zulu[2])
|
||||||
|
|||||||
Reference in New Issue
Block a user