I'm using laravel with xampp as it's server. But it doesn't seem to get the proper time. I tested this by having this code:
echo $today = date("Y-m-d H:i:s");
To solve the problem, I set Default time zone in controller, but this is tedious though since I have multiple controllers.
date_default_timezone_set('Asia/Kolkata'); $today = new DateTime();