2 $('#command_form').submit(function(ev
) {
3 if(!$('#field_fixed:checked').length
) {
7 var timestamp
= new Date($('#field_start_time').val());
8 var grace_time_in_ms
= grace_time_in_s
* 1000;
9 var js_utc_offset
= new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000;
10 if(timestamp
.getTime() < (js_utc_offset
+ (_server_utc_offset
*1000) - grace_time_in_ms
)) {
11 return confirm("Since you submitted a starting time that's more than "+grace_time_in_s
+" seconds old, this will be a retroactively scheduled downtime and thus it will show up separately in logs.\n\nIf this is a mistake, choose 'cancel' and correct the value.");