Chrono
This commit is contained in:
parent
bbbf83ad1e
commit
8d2e4d7e01
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace Mmi\Bundle\ChallengeBundle\Resources\Model;
|
||||
|
||||
use DateTime;
|
||||
|
||||
/**
|
||||
* Class ChallengePeer
|
||||
* @author Simon Vieille <simon@deblan.fr>
|
||||
|
@ -74,4 +76,12 @@ class ChallengePeer
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getChronoDate()
|
||||
{
|
||||
$now = new DateTime('now');
|
||||
$next = $now->modify('+1 hour');
|
||||
|
||||
return $next->format('d F Y H:00:00');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<!-- NE PAS OUBLIER DE CHANGER LA DATE !!! Sinon ça risque de sonner longtemps...-->
|
||||
|
||||
<h1 class="countdown" data-time="12 january 2016 21:51:00"><span class="minutes"></span>m <span class="seconds"></span>s</h1>
|
||||
<h1 class="countdown" data-time="{{ challenge_peer.chronoDate }}"><span class="minutes"></span>m <span class="seconds"></span>s</h1>
|
||||
|
||||
</header>
|
||||
<main id="container">
|
||||
|
|
Loading…
Reference in a new issue