available timezones
| From: | Justin French | Date: | Mon, 26 Jul 2004 05:34:21 +0000 |
| Subject: | available timezones | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-191865@lists.php.net to get a copy of this message | ||
Is there any way to retrieve an array of the available timezones on a Unix system for use with putenv("TZ=...")?
Usually they're stored in /usr/share/zoneinfo/ on my Mac, but I don't like my chances of:
- them being in the same place on every server
- them being readable via a PHP script
If there isn't such a function, a second option would be to check that whatever timezone I *plan* to use is available within the system.
<? putenv("TZ=Australia/Melbourne") ?> may have no affect on my scripts if the TZ is not recognised by the server.
---
Justin French
http://indent.com.au