$SITE[‘timeFormat’] = ‘D, d-M-Y g:ia T’;
Jack
$SITE[‘timeFormat’] = ‘D, d-M-Y g:ia T’;
Jack
Jack,
Try changing the
$utcstr = substr($indate,10) . " " . substr($indate,0,8); // move formats
to
$utcstr = substr($indate,10) . " " . substr($indate,0,9); // move formats
in your page.
I think I left in a version that only gets the ‘UT’ in ‘UTC’ which works for PHP4 but fails for PHP5. #-o
Ken
Ken,
So far no luck, but you are right I am on php5. Is it possible I need to wait for the next WD upload?
Regards,
Jack
Edit…The upload did not change anything.
If you changed the line from 8 to 9 chars, it should work at once. I see it is not working on your page now … hmmm.
I’ve updated the distributions with the revised wxastronomy.php page.
I see it is working on your page now
Hate to do this to you but if you looked at my wx7 that is written in there by me, it is not based on code (only a view source copy). The test site wx7play is not working.
Regards,
Jack
Jack,
Yes… sorry I posted early looking at a different website… I see your’s is not working.
Here’s the function code for the get_localdate() function that should work on PHP5 too:
<?php
function get_localdate ( $indate) {
global $SITE;
// Change '02:33 UTC 4 September 2007' to
// '3-Sep-2007 nn:nnpm'
$timeFormat = 'D, d-M h:ia T'; // Fri, 31-Mar-2006 14:03 TZone
$timeFormat = 'h:ia T D, d-M-Y '; // Fri, 31-Mar-2006 14:03 TZone
if(isset($SITE['timeFormat'])) { $timeFormat = $SITE['timeFormat']; }
$utcstr = substr($indate,10) . " " . substr($indate,0,9); // move formats
$utc = strtotime($utcstr);
$lclstr = date($timeFormat,$utc);
return ($lclstr);
}
?>
Best regards,
Ken
Oh man, I think I uploaded the wrong file a few minutes ago :oops: You are right, that fixed it!
Thanks Ken!
Great Jack! I’m glad we could solve it swiftly.
Best regards,
Ken
Added a slight mod to the GR3 radar page. You can choose the type of image you want to loop.
Ken,
If you want any of the files I’ve created to add to the template you are welcome to them.
Thats 8) … nice!
Yes, please send the mods…
Best regards,
Ken
Email coming. I also added a lightning page for the NexStorm/Wasp people.
Feel free to modify if you see a way to make it look better or to clean up the code.
This bit has this bunny confused :?
Where do you get PST8PDT or anything like it from here (http://saratoga-weather.org/timezone.txt)?
What should this line look like for this confused Kiwi?
$SITE[‘tz’] = ‘???’; //NOTE: this MUST be set correctly to…
Sorry to confuse. Those EST5EDT … PST8PDT are old definitions for US Eastern Standard/Daylight Time to Pacific Standard/Daylight Time … they work on most servers for USA locations.
For the Kiwi’s, I’d suggest
$SITE['tz'] = 'Pacific/Auckland';
or if appropriate for your location
$SITE['tz'] = 'Pacific/Chatham';
for the Chatham Islands
Hope this helps…
Best regards,
Ken
Thanks for the prompt help, fixed one of my problems :lol: - but I have figured out the one that stopped my page showing at all.
Don’t think there will be many using the Chathams option.
Warning: filemtime() [function.filemtime]: stat failed for forecast.txt in /home/bigbaywx/domains/bigbaywx.com/public_html/test/advforecast2.php on line 164
http://www.bigbaywx.com/test/advforecast2.php
Hmmmm…thats a different error. Have not seen that one before. It is calling the forecast but with that error printing on the top. Ideas??
Bigbaywx,
Do you have a forecast.txt in your root folder?
If you view the page and do a ‘View source’, you’ll see
<!-- advforecast2.php - V2.13 - 23-Dec-2007 -->
<!-- NWS URL: http://forecast.weather.gov/MapClick.php?CityName=Big+Bay&state=MI&site=MQT&textField1=46.815&textField2=-87.728&TextType=2 -->
<!-- zone=MIZ005 -->
<!-- unable to write cache file forecast.txt -->
You need to upload a blank forecast.txt file to the same directory as the advforecast2.php script, and set it’s permissions to 666 or 777 so it’s writable by the script. There are other cache files used by the various scripts too. It might be better to change the /test subdirectory permissions to 766 instead.
Best regards,
Ken
Ken,
It looks like if I wanted to add a keywords I should add the meta tag in top.php and the $keywords variablein the individual files. Is this correct?
Thanks for your help Ken, your up early today!!
For anyone…
Can someone tell me what I’m doing wrong with the Marquee?? It looks like I’m missing about 100px on the far right of the crawl. I’m using the same crawl that I did on the active page of "         Chance of rain, freezing rain and then snow on Sunday.         Quiet weather pattern next week with seasonally cool temperatures.         This station recorded a new record low temperature of -8.9
[quote author=Bigbaywx link=topic=30143.msg241467#msg241467 date=1204385857]
Thanks for your help Ken, your up early today!!
For anyone…
Can someone tell me what I’m doing wrong with the Marquee?? It looks like I’m missing about 100px on the far right of the crawl. I’m using the same crawl that I did on the active page of "         Chance of rain, freezing rain and then snow on Sunday.         Quiet weather pattern next week with seasonally cool temperatures.         This station recorded a new record low temperature of -8.9