Page 1 of 1

Setting starttime and endtime for a mission

Posted: Sun May 24, 2026 1:03 am
by acowman2
I've noticed something has changed with how dates are being handled. This line of lua used to work before the previous update:

ScenEdit_SetMission('RUSSIA', 'PHASE1 - SEAD', { isactive = false, starttime = '08/29/2024 00:00:01' });

The starttime now no longer gets set properly.
I checked the documentation and see theres a new date and time section so i tried copying the example:

local test = ScenEdit_GetMission('RUSSIA', 'PHASE1 - SEAD');
test.starttime = '2025-06-09 1:30:00!yyyy-MM-dd HH:mm:ss';
test.endtime = '2027-06-09 1:30:00!yyyy-MM-dd HH:mm:ss';
print(ScenEdit_GetMission('RUSSIA', 'PHASE1 - SEAD'));


Output:

mission {
guid = 'YCUWHY-0HNLP4J6J6LOP',
name = 'PHASE1 - SEAD',
side = 'RUSSIA',
type = 'Patrol',
subtype = 'SEAD Patrol',
isactive = 'True',
starttime = '',
endtime = '',
SISH = 'False',
aar = 'table',
unitlist = 'table',
}


The dates do not get updated.

What is the correct way to update start/end dates for missions?

Re: Setting starttime and endtime for a mission

Posted: Sun May 24, 2026 1:23 am
by acowman2
Also this block of lua used to work:

local activate_time = os.date('%c', ScenEdit_CurrentTime() + (60 * 5));
ScenEdit_SetTrigger({ description = 'TIMER_DELAY_START', mode = 'add', type = 'Time', time = activate_time });
ScenEdit_SetEventTrigger('EVENT_DELAY_START', { mode = 'add', description = 'TIMER_DELAY_START' });


but no longer sets the correct date in the trigger. After playing around i found replacing the 1st line with this does work:

local activate_time = os.date('%x %X', ScenEdit_CurrentTime() + (60 * 5));

Re: Setting starttime and endtime for a mission

Posted: Sun May 24, 2026 6:36 am
by blu3s
Use ISO date format:

Code: Select all

--START TIME
local current_time = ScenEdit_CurrentTime()
--END TIME
local end_time = os.date('!%Y-%m-%dT%H:%M:%S',current_time + (2 * 60 * 60) + 15*60 ) 

local aew_mission = ScenEdit_AddMission('BLUE','AEW','support',{zone={'AEW#1','AEW#2'}})
local aew_tot = os.date('!%Y-%m-%dT%H:%M:%S', current_time + (1 * 60 * 60) )
ScenEdit_SetMission('BLUE','AEW',{starttime=aew_tot, endtime=end_time, OnDeactivateRTB=true})

Re: Setting starttime and endtime for a mission

Posted: Sun May 24, 2026 2:26 pm
by acowman2
Thank you