One Hat Cyber Team
Your IP :
216.73.216.182
Server IP :
203.175.9.166
Server :
Linux tanggamus.iixcp.rumahweb.net 5.14.0-427.28.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 2 03:44:10 EDT 2024 x86_64
Server Software :
LiteSpeed
PHP Version :
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
cite5577
/
www
/
lib
/
pkp
/
classes
/
i18n
/
View File Name :
TimeZoneDAO.inc.php
<?php /** * @file classes/i18n/TimeZoneDAO.inc.php * * Copyright (c) 2014-2021 Simon Fraser University * Copyright (c) 2000-2021 John Willinsky * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. * * @class TimeZoneDAO * @package i18n * * @brief Provides methods for loading localized time zone name data. * */ class TimeZoneDAO extends DAO { var $cache; /** * Constructor. */ function __construct() { // Parent constructor intentionally not called } /** * Get the filename of the time zone registry file for the given locale */ function getFilename() { return "lib/pkp/registry/timeZones.xml"; } function &_getTimeZoneCache() { $cache =& Registry::get('allTimeZones', true, null); if ($cache === null) { $cacheManager = CacheManager::getManager(); $cache = $cacheManager->getFileCache( 'timeZone', 'list', array($this, '_timeZoneCacheMiss') ); // Check to see if the data is outdated $cacheTime = $cache->getCacheTime(); if ($cacheTime !== null && $cacheTime < filemtime($this->getFilename())) { $cache->flush(); } } return $cache; } function _timeZoneCacheMiss($cache, $id) { $timeZones =& Registry::get('allTimeZonesData', true, null); if ($timeZones === null) { // Reload time zone registry file $xmlDao = new XMLDAO(); $data = $xmlDao->parseStruct($this->getFilename(), array('timezones', 'entry')); $timeZones = array(); if (isset($data['timezones'])) { foreach ($data['entry'] as $timeZoneData) { $timeZones[$timeZoneData['attributes']['key']] = $timeZoneData['attributes']['name']; } } asort($timeZones); $cache->setEntireCache($timeZones); } return null; } /** * Return a list of all time zones. * @return array */ function &getTimeZones() { $cache =& $this->_getTimeZoneCache(); return $cache->getContents(); } }