domjudge
domjudge copied to clipboard
Allow relative (de)activate_time when importing contest.yaml
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:
The spec is indeed the reason these are only allowed to be the way they are. I would not be opposed to add support for this though. The fields without _ are legacy and I think we should not change them