We can set default time zone to local time zone.
Sometime hosting server is outside of India, then it will show wrong the today / current date time in PHP, for this we have to set time zone for India
1 2 3 4 | <?php date_default_timezone_set("Asia/Kolkata");//India time (GMT+5:30) echo date('d-m-Y H:i:s'); ?> |
Hope it works for you.