[xoops-cvslog 5600] CVS update: xoops2jp/html/kernel

Back to archive index

Minahito minah****@users*****
2006年 11月 4日 (土) 13:25:06 JST


Index: xoops2jp/html/kernel/timezone.php
diff -u xoops2jp/html/kernel/timezone.php:1.1.2.2.2.1 xoops2jp/html/kernel/timezone.php:1.1.2.2.2.2
--- xoops2jp/html/kernel/timezone.php:1.1.2.2.2.1	Thu Nov  2 23:20:24 2006
+++ xoops2jp/html/kernel/timezone.php	Sat Nov  4 13:25:06 2006
@@ -28,36 +28,36 @@
 		// This handler not connects to database.
 		//
 		$this->_mResult = array(
-			-12  => _TZ_GMTM12,
-			-11  => _TZ_GMTM11,
-			-10  => _TZ_GMTM10,
-			-9   => _TZ_GMTM9,
-			-8   => _TZ_GMTM8,
-			-7   => _TZ_GMTM7,
-			-6   => _TZ_GMTM6,
-			-5   => _TZ_GMTM5,
-			-4   => _TZ_GMTM4,
-			-3.5 => _TZ_GMTM35,
-			-3   => _TZ_GMTM3,
-			-2   => _TZ_GMTM2,
-			-1   => _TZ_GMTM1,
-			0    => _TZ_GMT0,
-			1    => _TZ_GMTP1,
-			2    => _TZ_GMTP2,
-			3    => _TZ_GMTP3,
-			3.5  => _TZ_GMTP35,
-			4    => _TZ_GMTP4,
-			4.5  => _TZ_GMTP45,
-			5    => _TZ_GMTP5,
-			5.5  => _TZ_GMTP55,
-			6    => _TZ_GMTP6,
-			7    => _TZ_GMTP7,
-			8    => _TZ_GMTP8,
-			9    => _TZ_GMTP9,
-			9.5  => _TZ_GMTP95,
-			10   => _TZ_GMTP10,
-			11   => _TZ_GMTP11,
-			12   => _TZ_GMTP12
+			"-12"  => _TZ_GMTM12,
+			"-11"  => _TZ_GMTM11,
+			"-10"  => _TZ_GMTM10,
+			"-9"   => _TZ_GMTM9,
+			"-8"   => _TZ_GMTM8,
+			"-7"   => _TZ_GMTM7,
+			"-6"   => _TZ_GMTM6,
+			"-5"   => _TZ_GMTM5,
+			"-4"   => _TZ_GMTM4,
+			"-3.5" => _TZ_GMTM35,
+			"-3"   => _TZ_GMTM3,
+			"-2"   => _TZ_GMTM2,
+			"-1"   => _TZ_GMTM1,
+			"0"    => _TZ_GMT0,
+			"1"    => _TZ_GMTP1,
+			"2"    => _TZ_GMTP2,
+			"3"    => _TZ_GMTP3,
+			"3.5"  => _TZ_GMTP35,
+			"4"    => _TZ_GMTP4,
+			"4.5"  => _TZ_GMTP45,
+			"5"    => _TZ_GMTP5,
+			"5.5"  => _TZ_GMTP55,
+			"6"    => _TZ_GMTP6,
+			"7"    => _TZ_GMTP7,
+			"8"    => _TZ_GMTP8,
+			"9"    => _TZ_GMTP9,
+			"9.5"  => _TZ_GMTP95,
+			"10"   => _TZ_GMTP10,
+			"11"   => _TZ_GMTP11,
+			"12"   => _TZ_GMTP12
 		);
 	}
 	
@@ -69,15 +69,18 @@
 	
 	function &get($offset)
 	{
-		if (isset($this->_mResult[$offset])) {
-			$obj =& new XoopsTimezone();
-			$obj->setVar('offset', $offset);
-			$obj->setVar('zone_name', $this->_mResult[$offset]);
+		$ret = null;
+		
+		foreach ($this->_mResult as $index => $zone_name) {
+			if (floatval($index) == floatval($offset)) {
+				$obj =& new XoopsTimezone();
+				$obj->set('offset', $index);
+				$obj->set('zone_name', $zone_name);
 
-			return $obj;
+				return $obj;
+			}
 		}
 		
-		$ret = null;
 		return $ret;
 	}
 


xoops-cvslog メーリングリストの案内
Back to archive index