3 * Import system timezones into PHP, for FusionForge
6 * Thorsten “mirabilos” Glaser <t.glaser@tarent.de>
9 * This file is part of FusionForge. FusionForge is free software;
10 * you can redistribute it and/or modify it under the terms of the
11 * GNU General Public License as published by the Free Software
12 * Foundation; either version 2 of the Licence, or (at your option)
15 * FusionForge is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 if (file_exists("/usr/share/zoneinfo/UTC")) {
27 /* avoid making $TZs a reference, which ls() returns */
28 foreach (ls("/usr/share/zoneinfo") as $j) {
29 if (!in_array($j, array(
38 /* not masked or non-timezone */
47 if (is_dir("/usr/share/zoneinfo/" . $TZs[$i])) {
48 foreach (ls("/usr/share/zoneinfo/" . $TZs[$i])
50 $TZs[] = $TZs[$i] . "/" . $k;
62 if (!isset($TZs) || !$TZs) {
63 /* fall back to SourceForge compiled-in list */
64 include dirname(__FILE__).'/timezones-sf.php';