I live in the U.S. Central Standard Timezone, so naturally, my website follows CST. In one of my scripts, I use this:
PHP Code:
date_default_timezone_set('US/Central');
to set the date accordingly before I insert it into my database. However, on this page from php.net, it warns PHP users not to use any of those timezones except for UTC.
Is there a better way I can set the timezone to U.S. CST before I insert it into my database?
"America/Chicago" should be fine for CST (CDT starting this Sunday!).
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Daylight savings time starts the 2nd Sunday of March these days. So Central Standard Time will become Central Daylight Time this Sunday.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
EST -> EDT
CST -> CDT
MST -> MDT (Except in Arizona, which is MST all year long)
PST -> PDT
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks