As i said before, its 20 min past midnight, and when i do check the date using php
as date(“Y-m-d”);
and date(“Y-m-d”,strtotime(“now”));
i still get the previous days’ date. I expected a lot of things to go wrong while coding but definitely not this. I wouldnt even have it in the list of potential-things-that-could-go-wrong. I have refereshed the browser, using SHift + refresh and have also gone to the extent of restarting the system.
What went wrong?
Are you sure that you get the correct time? I.e. print more info:
This will give you everything, date, time, time zone etc.
You can set the timezone you want to use with date_default_timezone_set. You can find a list of valid timezones here.
You can also set a timezone in your php.ini config by setting the date.timezone-directive.