timeofday
vbox
20
false
hbox
1
1
hbox
vbox
true
table
date_group
0
0
1
0
1
demand-year
/sim/time/demand-year
dialog-apply
demand-year
nasal
0
1
1
1
1
month-combo
/sim/time/demand-month
false
130
fill
dialog-apply
month-combo
nasal
0
2
1
2
demand-day
/sim/time/demand-day
1
dialog-apply
demand-day
nasal
true
vbox
table
center
0
0
left
0
0
1
left
0
true
/sim/time/gmt-string
0
2
left
0
1
0
left
0
1
1
left
0
true
/sim/time/local-time-string
1
2
left
0
true
/sim/time/local-timezone
true
/sim/speed-up
hbox
0
1
true
/sim/time/warp-delta
hbox
0
true
2
5
vbox
0
center
0
monthmax[month-1])
setprop("/sim/time/demand-day",sprintf("%02d",monthmax[month-1]));
}
tod_setminuteofday = func(minute){
var hour = minute/60;
var minute = math.fmod(minute,60);
var second = 0;
var new_dt=sprintf("%04d-%02d-%02dT%02d:%02d:%02d",getprop("/sim/time/demand-year"),month,getprop("/sim/time/demand-day"),hour,minute,second*1);
setprop("/sim/time/gmt",new_dt);
printf(new_dt);
}
]]>