I have a basic php script
<?php
$today = date("Y-m-d");
echo $today;
?>
Which should output 2014-11-14. However, I am getting output of 2014-11-15 even though my system tray displays 2014-11-14.
I changed the system date back one day (13th) and I got the output I wanted (14th)... Earlier today I had to do a system restore and ran Malwarebytes because I picked up a virus. Could this be the cause of this?
Does anyone know where else I can check my systems time other than the system tray?
date()
function uses unix timestamps which always is set to +0:00So use:
When you set your default timezone it will automaticly calculate the offset!