Excuse me, can you help to edit this code, it basically reads the current user time zone (javascript), I need this time zone to be stored in php, so I can add a number of minutes to five me a new timing.
<html>
<script type="text/javascript">
var currentTime = new Date();
var hours = currentTime.getHours();
var minutes = currentTime.getMinutes();
if (minutes < 10) {
minutes = "0" + minutes;
}
</script>
<?php
$getting_time = "<script> document.write(hours, minutes); </script>";
$endTime1 = strtotime("+10 minutes", strtotime($getting_time));
echo date('h:i A', $endTime1);
echo "<br>";
?>
</html>
For more clarification:
- If the client's timing now is 15:30
- I want to add to this timing 120 minutes
- So, the final timing will be 17:30
Thank you
I am not familiar at all with JavaScript, I visited the suggested Q, but I couldn't solve my issue.