domjudge icon indicating copy to clipboard operation
domjudge copied to clipboard

Allow relative (de)activate_time when importing contest.yaml

Open mpsijm opened this issue 1 year ago • 1 comments

Follow-up of #1807.

Description of the enhancement request

In contest.yaml, activate_time and deactivate_time now need to be full-blown ISO strings, but I would like to use relative times as well.

Details

When creating a contest via the web interface, the "Activate time" and "Deactivate time" are allowed to be relative times. However, in contest.yaml, these fields are required to be in ISO format: https://github.com/DOMjudge/domjudge/blob/main/webapp/src/Service/ImportExportService.php#L181-L195

And perhaps on a similar note, the duration field currently only allows relative times, whereas scoreboard_freeze_duration only allows relative times but has an alternative called scoreboard-freeze/freeze that only allows absolute timestamps. It would be nice if all of these are consistent, although perhaps it's a bad idea to deviate too much from https://ccs-specs.icpc.io/draft/contest_api#contests :stuck_out_tongue:

mpsijm avatar Jun 02 '23 12:06 mpsijm