Update of /cvsroot/phpweather/phpweather/output
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30964/output
Modified Files:
pw_text.php
Log Message:
Fixed the timestamp for METAR retreival and archiving in mysql and null backends. The timestamp is kept as a unix timestamp (UTC) in the objects. The mysql backend has been modified to keep a UTC format in the table.
Index: pw_text.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/output/pw_text.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- pw_text.php 20 Sep 2003 22:18:47 -0000 1.22
+++ pw_text.php 30 Jan 2004 20:46:36 -0000 1.23
@@ -639,7 +639,7 @@
if ($minutes_old > 60) {
$hours = round((time() - $time)/3600);
$minutes = $minutes_old % 60;
- if ($minutes < 1) {
+ if ($minutes < 1) {
$minutes = '';
} else {
$minutes = sprintf($this->strings['time_minutes'],
@@ -1190,7 +1190,8 @@
echo "<b>icao</b>: ".$taf['icao']."<br>\n";
echo "<b>time_emit</b>: ".$taf['time_emit']."<br>\n";
- echo "<b>time_use</b>: ".$taf['time_use']."<br>\n";
+ echo "<b>time_use_from</b>: ".$taf['time_use_from']."<br>\n";
+ echo "<b>time_use_to</b>: ".$taf['time_use_to']."<br>\n";
echo "<b>location</b>: ".$taf['location']."<br>\n";
echo "<b>periods</b>:<br><br>";
@@ -1215,9 +1216,16 @@
echo "<td>".substr($period['time_to'],6,6)."</td>\n";
echo "<td>";
if(isset($period['desc']['wind'])) {
- if($period['desc']['wind']['deg']=='VRB') echo "VRB";
- else echo round($period['desc']['wind']['deg'],1);
- echo " @ ".round($period['desc']['wind']['knots'],1)." kt";
+ if (isset($period['desc']['wind']['gust_knots'])) {
+ echo round($period['desc']['wind']['deg'],1);
+ echo " @ ".round($period['desc']['wind']['knots'],1)."G".round($period['desc']['wind']['gust_knots'],1)." kt";
+
+ }
+ else {
+ if($period['desc']['wind']['deg']=='VRB') echo "VRB";
+ else echo round($period['desc']['wind']['deg'],1);
+ echo " @ ".round($period['desc']['wind']['knots'],1)." kt";
+ }
}
echo "</td>\n";
echo "<td>";
|