[Solved] how can i make a countdown timer that goes past the 60minutes

The current minute is never an issue. You are concerned with the duration since last blocked, not with “what time was that”: block_user.php: <?php $now = new DateTime(); write_block_into_database($ip_address, $now->format(‘Y-m-d H:i:s’)); ?> check_block.php <?php $sql=”SELECT 1 FROM sometable WHERE ip_address=? AND DATE_ADD(blocked_at, INTERVAL 1 HOURS) >= NOW()”; if(get_result($sql, $ip_address)) { // this address is blocked … Read more

[Solved] Edit date/time string via Javascript/jQuery

You can follow this code: HTML <div class=”date-string”>2016-01-14T10:30:37+02:00</div> <div class=”date-string”>2013-02-16T10:30:37+02:00</div> <div class=”date-string”>2017-03-15T10:30:37+02:00</div> JavaScript var d, newDateFormat; function getZero(number){ if(number < 10) return ‘0’ + number; return number; } $(‘.date-string’).each(function(){ d = new Date($(this).html()); newDateFormat = getZero(d.getDate()) + “https://stackoverflow.com/” + getZero(d.getMonth() + 1) + “https://stackoverflow.com/” + d.getFullYear(); $(this).html(newDateFormat); }); And here is the output: 2 solved … Read more