PHP SNIPPET

Get and set timezones in php




If you work with dates and time most of the times, setting up timezones must be your first priority to get accurate results. Using the following snippet you can get and set timezones in php

You can find the list of supported timezones from the php official site.

To set a timezone use the below snippet.

To get your current timezone use the below snippet.







2 Replies to “Get and set timezones in php

Leave a Reply

Your email address will not be published. Required fields are marked *