Skip to content

Commit

Permalink
OSX-397 fixes flip clock countdown on windows player
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterMis committed Apr 11, 2019
1 parent 7bc3f05 commit ffb7ae6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/clock-get-resource-flip.twig
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
<script type="text/javascript">
function getTimeRemaining(endtime) {
var t = Date.parse(endtime) - Date.parse(new Date());
// for IE and Windows player
var endtimeFormatted = endtime.replace(/^(.*-[0-9][0-9])( )([0-9][0-9]:.*$)/, '$1T$3');
var t = Date.parse(endtimeFormatted) - Date.parse(new Date());
var seconds = Math.floor( (t/1000) % 60 );
var minutes = Math.floor( (t/1000/60) % 60 );
var hours = Math.floor( (t/(1000*60*60)) % 24 );
Expand Down

0 comments on commit ffb7ae6

Please sign in to comment.