Change Timezone in PHP

Posted by in PHP

DateTimeZone is the representation of time zone. You can change the timezone using this function. For example, If you want Indian time zone, use “Asia/Kolkata”.

This link will give you a list of time zones. Use this function date_default_timezone_get() to know the default timezone of your server.

OUTPUT: The current server timezone is: Europe/Paris