Click here to Skip to main content
13,549,950 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


6 bookmarked
Posted 5 Aug 2008
Licenced CPOL

Timezones in PHP

, 5 Aug 2008
Rate this:
Please Sign up or sign in to vote.
List of all timezones in PHP.



In PHP 5, there are some methods to set or get the default timezone. For example, using this code, I set the default timezone used by all date/time functions:

    date_default_timezone_set("Asia/Tehran"); //I set timezone for Tehran

In another example, I set the default timezone for Tokyo:


There are many lists of timezones in the PHP manual (for more info about date_default_timezone_set, see here). I just got them into the menu list in HTML.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Mohammad Dayyan
Iran (Islamic Republic of) Iran (Islamic Republic of)
No Biography provided

You may also be interested in...

Comments and Discussions

GeneralMy vote of 1 Pin
stankomix120-Dec-11 23:56
memberstankomix120-Dec-11 23:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01-2016 | 2.8.180515.1 | Last Updated 5 Aug 2008
Article Copyright 2008 by Mohammad Dayyan
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid