Swat/SwatDate.php
public static function getTimeZoneAbbreviations()
    {
        static $shortnames = null;

        if (self::$tz_abbreviations === null) {
            self::$tz_abbreviations = array();

            $abbreviations = DateTimeZone::listAbbreviations();
            foreach ($abbreviations as $abbreviation => $time_zones) {
                if (isset(self::$valid_tz_abbreviations[$abbreviation])) {
                    foreach ($time_zones as $tz) {
                        $tz_id = $tz['timezone_id'];
                        if (!isset(self::$tz_abbreviations[$tz_id])) {
                            self::$tz_abbreviations[$tz_id] = array();
                        }

                        // daylight-time or standard-time
                        $key = $tz['dst'] ? 'dt' : 'st';
                        if (!isset(self::$tz_abbreviations[$tz_id][$key])) {
                            self::$tz_abbreviations[$tz_id][
                                $key
                            ] = mb_strtoupper($abbreviation);
                        }
                    }
                }
            }
        }

        return self::$tz_abbreviations;
    }
public static function getTimeZoneAbbreviations()
    {
        static $shortnames = null;

        if (self::$tz_abbreviations === null) {
            self::$tz_abbreviations = array();

            $abbreviations = DateTimeZone::listAbbreviations();
            foreach ($abbreviations as $abbreviation => $time_zones) {
                if (isset(self::$valid_tz_abbreviations[$abbreviation])) {
                    foreach ($time_zones as $tz) {
                        $tz_id = $tz['timezone_id'];
                        if (!isset(self::$tz_abbreviations[$tz_id])) {
                            self::$tz_abbreviations[$tz_id] = array();
                        }

                        // daylight-time or standard-time
                        $key = $tz['dst'] ? 'dt' : 'st';
                        if (!isset(self::$tz_abbreviations[$tz_id][$key])) {
                            self::$tz_abbreviations[$tz_id][
                                $key
                            ] = mb_strtoupper($abbreviation);
                        }
                    }
                }
            }
        }

        return self::$tz_abbreviations;
    }
public static function getTimeZoneAbbreviations ( ) { static $ shortnames = null ; if ( self :: $ tz_abbreviations === null ) { self :: $ tz_abbreviations = array ( ) ; $ abbreviations = DateTimeZone :: listAbbreviations ( ) ; foreach ( $ abbreviations as $ abbreviation => $ time_zones ) { if ( isset ( self :: $ valid_tz_abbreviations [ $ abbreviation ] ) ) { foreach ( $ time_zones as $ tz ) { $ tz_id = $ tz [ 'timezone_id' ] ; if ( ! isset ( self :: $ tz_abbreviations [ $ tz_id ] ) ) { self :: $ tz_abbreviations [ $ tz_id ] = array ( ) ; } // daylight-time or standard-time $ key = $ tz [ 'dst' ] ? 'dt' : 'st' ; if ( ! isset ( self :: $ tz_abbreviations [ $ tz_id ] [ $ key ] ) ) { self :: $ tz_abbreviations [ $ tz_id ] [ $ key ] = mb_strtoupper ( $ abbreviation ) ; } } } } } return self :: $ tz_abbreviations ; }
Gets a mapping of time zone names to time zone abbreviations

Note: the data generated by this method is cached in a static array. The
first call will be relatively expensive but subsequent calls won't do
additional calculation.

@return array an array where the array key is a time zone name and the
array value is an array containing one or both of
- 'st' for the standard time abbreviation, and
- 'dt' for the daylight time abbreviation.
Gets a mapping of time zone names to time zone abbreviations