diff options
| author | cassio <cassiopc@gmail.com> | 2018-09-05 12:55:12 +0000 |
|---|---|---|
| committer | cassio <cassiopc@gmail.com> | 2018-09-05 12:55:12 +0000 |
| commit | 034545b62ea8e7e10d544b40e1bb78778a874f71 (patch) | |
| tree | 9ab6623276e73aac2ae53407d4a5b751fcab3e05 /src/fcontest.php | |
| parent | 6cefeaeb0a2992b48315d253d2528278a6445251 (diff) | |
| download | boca-034545b62ea8e7e10d544b40e1bb78778a874f71.tar.gz boca-034545b62ea8e7e10d544b40e1bb78778a874f71.zip | |
more details in clock and fix of timestamp
Diffstat (limited to 'src/fcontest.php')
| -rw-r--r-- | src/fcontest.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fcontest.php b/src/fcontest.php index 9989931..ccd3e11 100644 --- a/src/fcontest.php +++ b/src/fcontest.php @@ -1387,6 +1387,10 @@ function siteclock() { return array("contest not running",-1000000000); if ($s["currenttime"]<0) { $t = - $s["currenttime"]; + if($t>3600*24) { + $t = ((int) ($t/(360*24)))/10; + return array("> ". $t . " day(s) to start",$s["currenttime"]); + } if($t>3600) { $t = ((int) ($t/360))/10; return array("> ". $t . " hour(s) to start",$s["currenttime"]); @@ -1401,6 +1405,10 @@ function siteclock() { if ($s["currenttime"]>=0) { $t = $s["siteduration"] - $s["currenttime"]; $str = ''; + if($t >= 3600*24) { + $str .= ((int)($t/(3600*24))) . 'd '; + $t = $t % (3600*24); + } if($t >= 3600) { $str .= ((int)($t/3600)) . 'h '; $t = $t % 3600; |