0

I have edited my php.ini file with this:

date.timezone = 'Europe/Kiev'

But when I am calling

date("Y-m-d H:i");

It returns 2018-10-15 09:09 when it's 12:09 in my country. How to change php timezone? I'm running on debian, and debian time is right

  • Possible duplicate of [Timezone conversion in php](https://stackoverflow.com/questions/2505681/timezone-conversion-in-php) – Mohammad Oct 15 '18 at 09:27
  • Make sure you have restart your server after made this change – Mithu CN Oct 15 '18 at 09:27
  • Possible duplicate of [How to change default time zone in php](https://stackoverflow.com/questions/27348112/how-to-change-default-time-zone-in-php) – Dave Oct 15 '18 at 09:34

1 Answers1

0

just use below function in your script ,it will set default time zone.

date_default_timezone_set("europe/kiev");
Mohammad
  • 21,175
  • 15
  • 55
  • 84
Sanu0786
  • 571
  • 10
  • 15