Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On Firefox the system works well and counts up from "now" using the code
<?php $day=date("Y-m-d H:i:s"); ?>
<p class="timer-float"><span class="jst_timer"><span class="datetime" style="display:none;"><?php print $day; ?></span> <span class="dir" style="display:none;">up</span> <span class="format_txt" style="display:none;">%mins%:%secs%</span> </span></p>
But the system does not work on Chrome, Safari or IE. Is there a way to count up from NOW or implement a simple minute:second timer
Comments
Comment #1
jvandervort CreditAttribution: jvandervort commentedSee if you can capture the output as rendered?
Ie without the php tags.
Comment #2
pbrough CreditAttribution: pbrough commentedThis is the source from chrome:
<p class="timer-float"><span class="jst_timer"><span class="dir" style="display:none;">up</span><span class="datetime" style="display:none;">2013-01-28 13:28:23</span><span class="format_txt" style="display:none;">%mins%:%secs%</span> </span></p>
This is identical code as shown in Firefox.
Comment #3
jvandervort CreditAttribution: jvandervort commentedFunny, that code snippet works in IE9, Firefox 18 and Chrome 24.0.1312.56 for me.
Comment #4
pbrough CreditAttribution: pbrough commentedThe code works find but I wanted to use the NOW time so the counter will go up from 00:00. The code works if I do not use PHP to generate the time stamp
Comment #5
jvandervort CreditAttribution: jvandervort commentedMake sure to add the timezone offset if you want to use server time through php.
Also you could try just counting up (without the php):
If you just want to start counting up.