Note: Due to the amount of SPAM received in the forums and to better serve our customers, support is now done by sending a message using the "Contact" link above . This forum is set to read-only, but you can still search the forum.

Zap Weather Questions and Comments
  • Page:
  • 1
  • 2

TOPIC: Current Conditions Not Being Updated

Current Conditions Not Being Updated 14 years 10 months ago #127

  • jdrenken7
  • jdrenken7's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Hello,

I installed the component and module per the instructions and my module shows that the current conditions haven't been updated for more than 6 hours. However, when I go to the St. Louis National Weather Service page for Fulton, MO's forecast the update is as such...

Last Update on Jun 4, 11:54 am CDT

Also, the instructions on installing the cron script isn't detailed enough for someone like me. Could you describe it a little better in layman's terms?
The administrator has disabled public write access.

Re:Current Conditions Not Being Updated 14 years 10 months ago #131

  • soundroom
  • soundroom's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
I am having the same problem. I have recently installed started testing zWeather on my site. The observation "Current Conditions" worked for about a day but now it just always reports that the observation is older than 5 hours. I have deleted the cache and refreshed it numerous times but it still won't show. I went onto NWS site and saw that the Station was updated. I turned on the zWeather debug and it looked like the information on the screen showed that the data in cache was updated. I reloaded the latest version of everything module 6.0 and component 6.0.1 and it still is stuck, however I noted that the changes implied that this bug was fixed in the current version.

I couldn't get the cron to run with my web host either. However, my provider gave me the ability to schedule the server to run a URL. I looked inside the cron code and saw that all it really did was activate this url on my site:
/index.php?option=com_zweather&task=refreshcache
When I first ran it from my host's control panel it produced an error message said the IP address (which it displayed) was not allowed to refresh. I put that IP address into the remote IP settings in the component admin and now it is working just like the cron would.
The administrator has disabled public write access.

Re:Current Conditions Not Being Updated 14 years 10 months ago #132

  • cogliano
  • cogliano's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1854
  • Thank you received: 58
  • Karma: 29
I checked my demo page here and 1 out of 3 locations is out of date for the observation. I'm looking into it. What observation location code are you using?
The administrator has disabled public write access.

Re:Current Conditions Not Being Updated 14 years 10 months ago #133

  • jdrenken7
  • jdrenken7's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
MOZ050 is the NWS Zonal code for Fulton, MO for the forecast while KCOU is the local observation for Columbia Regional Airport.
Last Edit: 14 years 10 months ago by jdrenken7.
The administrator has disabled public write access.

Re:Current Conditions Not Being Updated 14 years 10 months ago #134

  • soundroom
  • soundroom's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
I was digging.

It seems that something was going on with the code that tries to adjust for the difference in the timezones.

In the component file zweather.html.php the value for hours since last observed was essentially my servers difference from GMT (4 Hours). So my observation time was always calculated to be 4 to 5 hours behind.

I changed line 1018 from:
$servertime = time() - date('Z', $xmldate);
to:
$servertime = time() + date('Z', time()) - date('Z', $xmldate);

and that worked for me.

For some reason on my server "date('Z', time())" gives a value that of -144000 but I think its normally expected to give zero.
The administrator has disabled public write access.

Re:Current Conditions Not Being Updated 14 years 10 months ago #135

  • jimp
  • jimp's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
soundroom wrote:
I changed line 1018 from:
$servertime = time() - date('Z', $xmldate);
to:
$servertime = time() + date('Z', time()) - date('Z', $xmldate);

I made the same change on my ZWeather install and the forecast is working again. Perhaps something in the NWS feed changed after that downtime.
Last Edit: 14 years 10 months ago by jimp.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.092 seconds
Powered by Kunena Forum