Author Topic: NOAA-reports-test.php (Resolved)  (Read 640 times)

0 Members and 1 Guest are viewing this topic.

Offline Mark / Ohio

  • Live from Mars!
  • Forecaster
  • *****
  • Posts: 2511
    • Fairfield County Weather
NOAA-reports-test.php (Resolved)
« on: November 25, 2014, 08:33:39 PM »
Hi all,

I finally decided to automate this task as more and more I was not getting around to manually uploading the old files for archiving until months later.  Anyway I have it running OK for the most part on the current files and the year files.  But despite having all months back to 2003 in the /NOAA-reports/ I'm only get the current and prior month along with the year data to show up.

http://fairfieldcountyweather.com/NOAAarchive.php

( http://fairfieldcountyweather.com/NOAA-reports-test.php )

Is there something I'm missing that is needed to jump start the script to recognize all the other months? 

http://www.fairfieldcountyweather.com/NOAA-reports/
« Last Edit: November 28, 2014, 10:58:56 PM by Mark / Ohio »
Mark 
2002 Davis VP I Wireless, WeatherLink (Serial), GRLevel3, VirtualVP, StartWatch, Weather Display, Windows 10


Offline Mark / Ohio

  • Live from Mars!
  • Forecaster
  • *****
  • Posts: 2511
    • Fairfield County Weather
Re: NOAA-reports-test.php
« Reply #1 on: November 28, 2014, 08:41:07 PM »
I found in the code this:

$ourTZ = 'PST8PDT';

and changed it to this:

$ourTZ = 'EST5EDT';

To reflect my being in Eastern Time zone and a GMT -5 offset.  (I assume that is the purpose of that line.)

My understanding of php coding is still very rough.  Looks to me like it is pulling server time to determine the current month and from that the prior month and year??

I have the feeling that if I could temporarily fudge the month to Feb, then April, then June, then August in the code maybe it would pickup and lock in the months that currently do not have links??  I tried fudging the current date by uploading an old NOAAMO.TXT and NOAAPRYR.TXT file but that did not accomplish anything.

 #-o  Gotta be something silly I'm looking past that is going on here in my setup.   :-k
« Last Edit: November 28, 2014, 08:42:38 PM by Mark / Ohio »
Mark 
2002 Davis VP I Wireless, WeatherLink (Serial), GRLevel3, VirtualVP, StartWatch, Weather Display, Windows 10


Offline Murry Conarroe

  • Contributor
  • ***
  • Posts: 143
    • Wildwood Weather
Re: NOAA-reports-test.php
« Reply #2 on: November 28, 2014, 09:21:09 PM »
The month number for the NOAA reports need to always be two characters.
So January thru September reports should be 01 to 09 instead of 1 to 9.
Murry

Offline Mark / Ohio

  • Live from Mars!
  • Forecaster
  • *****
  • Posts: 2511
    • Fairfield County Weather
Re: NOAA-reports-test.php
« Reply #3 on: November 28, 2014, 10:57:26 PM »
Thank you Murry!!   =D>

That did the trick! :-D Now it makes sense why it was working for the the 10-12 month.   
Mark 
2002 Davis VP I Wireless, WeatherLink (Serial), GRLevel3, VirtualVP, StartWatch, Weather Display, Windows 10


 

anything