note 26847 deleted from function.strftime by derick

From: Date: Sun, 14 Aug 2005 12:02:46 +0000
Subject: note 26847 deleted from function.strftime by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-93621@lists.php.net to get a copy of this message
Note Submitter: mbostrom at paragee dot com ---- If you are building a web app that will be used by people different timezones from the server on which the app is running, you can switch the timezone on the fly by doing the following before calling strftime (), or the other timestamp processing functions. This is very easy if you know how to do it. If you don't you'll spend hours trying to manually slide timestamps around. putenv ("TZ=PST8PDT"); print strftime ("%T %Z"); putenv ("TZ=EST5EDT"); print strftime ("%T %Z"); Valid timezone codes can (usually) be seen (on Linux, at least) in /usr/share/zoneinfo or /usr/lib/zoneinfo (according to the tzset manpage).

« previous php.notes (#93621) next »