cvs: pear /Services_Weather/Weather Metar.php
| From: | Alexander Wirtz | Date: | Sun, 19 Mar 2006 07:45:52 +0000 |
| Subject: | cvs: pear /Services_Weather/Weather Metar.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-39189@lists.php.net to get a copy of this message | ||
eru Sun Mar 19 07:45:52 2006 UTC
Modified files:
/pear/Services_Weather/Weather Metar.php
Log:
Sunrise/set not in GMT
http://cvs.php.net/viewcvs.cgi/pear/Services_Weather/Weather/Metar.php?r1=1.98&r2=1.99&diff_format=u
Index: pear/Services_Weather/Weather/Metar.php
diff -u pear/Services_Weather/Weather/Metar.php:1.98 pear/Services_Weather/Weather/Metar.php:1.99
--- pear/Services_Weather/Weather/Metar.php:1.98 Thu Mar 16 21:06:06 2006
+++ pear/Services_Weather/Weather/Metar.php Sun Mar 19 07:45:52 2006
@@ -40,7 +40,7 @@
* @author Alexander Wirtz <alex@pc4p.net>
* @copyright 2005-2006 Alexander Wirtz
* @license http://www.opensource.org/licenses/bsd-license.php
BSD License
- * @version CVS: $Id: Metar.php,v 1.98 2006/03/16 21:06:06 eru Exp $
+ * @version CVS: $Id: Metar.php,v 1.99 2006/03/19 07:45:52 eru Exp $
* @link http://pear.php.net/package/Services_Weather
* @link http://weather.noaa.gov/weather/metar.shtml
* @link http://weather.noaa.gov/weather/taf.shtml
@@ -1094,7 +1094,7 @@
case "valid":
$pointer["validRaw"] = $result[0];
// Generates the timeperiod the report is valid for
- list($year, $month, $day) = explode("-",
date("Y-m-d", $forecastData["update"]));
+ list($year, $month, $day) = explode("-",
gmdate("Y-m-d", $forecastData["update"]));
// Date is in next month
if ($result[1] < $day) {
$month++;
@@ -1757,8 +1757,8 @@
$locationReturn["name"] = $locname;
$locationReturn["latitude"] = $this->_location["latitude"];
$locationReturn["longitude"] = $this->_location["longitude"];
- $locationReturn["sunrise"] = date($this->_timeFormat,
$this->calculateSunRiseSet(gmmktime(), SUNFUNCS_RET_TIMESTAMP,
$this->_location["latitude"], $this->_location["longitude"],
SERVICES_WEATHER_SUNFUNCS_SUNRISE_ZENITH, 0, true));
- $locationReturn["sunset"] = date($this->_timeFormat,
$this->calculateSunRiseSet(gmmktime(), SUNFUNCS_RET_TIMESTAMP,
$this->_location["latitude"], $this->_location["longitude"],
SERVICES_WEATHER_SUNFUNCS_SUNSET_ZENITH, 0, false));
+ $locationReturn["sunrise"] = gmdate($this->_timeFormat,
$this->calculateSunRiseSet(gmmktime(), SUNFUNCS_RET_TIMESTAMP,
$this->_location["latitude"], $this->_location["longitude"],
SERVICES_WEATHER_SUNFUNCS_SUNRISE_ZENITH, 0, true));
+ $locationReturn["sunset"] = gmdate($this->_timeFormat,
$this->calculateSunRiseSet(gmmktime(), SUNFUNCS_RET_TIMESTAMP,
$this->_location["latitude"], $this->_location["longitude"],
SERVICES_WEATHER_SUNFUNCS_SUNSET_ZENITH, 0, false));
$locationReturn["elevation"] = $this->_location["elevation"];
return $locationReturn;