This code date("H:i")
return invalid hour:min for me.
Current time windows server 2016 is 10:55 But date("H:i")
return 11:55 !?
My PHP version is 5.6.37 and install timezonedb
extention but I still have this problem.
I set time zone to Asia/Tehran
and get current value with date_default_timezone_get()
everything all right.
Result PHP code:
2
Answers
Iran now has Daylight Saving Time, so I suggest you update your operating system, or use an external 3rd party service to get the current time.
get more information at Official Time Zone Authority
I found the news here https://www.timeanddate.com/news/time/iran-dst-2022.html, it says Iran has decided to cancel DST from 2023, so make sure you have installed the lastest timezonedb extension. You can check it with the following code: