The time zone of the server running the script can be collected by using date_default_timezone_get() function. Sample code
If your error reporting is on then you will warning message saying
So it is always better to set your own timezone by using date_default_timezone_set() function before using any date functions in your script.
Subscribe to our YouTube Channel here
This article is written by plus2net.com team. https://www.plus2net.com