1
1
mirror of https://github.com/renbaoshuo/S2OJ.git synced 2025-03-30 04:17:02 +00:00

fix: will start in ceil(x) days

This commit is contained in:
Baoshuo Ren 2022-09-26 17:04:13 +08:00
parent fc66e5afe5
commit e013100989
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

@ -57,7 +57,7 @@
$rest_seconds = $contest['start_time']->getTimestamp() - UOJTime::$time_now->getTimestamp();
?>
<?php if ($rest_seconds > 86400): ?>
<?= UOJLocale::get('contests::will start in x days', floor($rest_seconds / 86400)) ?>
<?= UOJLocale::get('contests::will start in x days', ceil($rest_seconds / 86400)) ?>
<?php else: ?>
<div id="contest-<?= $contest['id'] ?>-countdown"></div>
<script>$('#contest-<?= $contest['id'] ?>-countdown').countdown(<?= $rest_seconds ?>, function(){}, 'inherit', false);</script>