Page 1 of 1

Problem with date and time for update

Posted: Sun 15 Oct 2017 10:27 am
by perl
Hi,
I have a PI with CumulusMX and and Davis running, which works perfect.

Now I am trying to get another station with fineoffset, PI and CumulusMX up running.

The status is ok
ScreenShot430.jpg
But I have troubles with the index.php. When the page loads, date and time is ok, but less than 1 second it fall bach to show an old time :
ScreenShot429.jpg
Can anyone explain to me why?

Where does this wrong date and time come from.

The realtime file shows: 15/10/17 12:11:46 14.6 99 14.4 1.0 2.7

Re: Problem with date and time for update

Posted: Sun 15 Oct 2017 4:25 pm
by ConligWX
not sure where the issues is as when i looked at your site it is behaving correctly.

though you do need to update some templates.

http://vejr.perlaustsen.dk/check-fetch- ... w=versions

Re: Problem with date and time for update

Posted: Mon 16 Oct 2017 1:43 am
by perl
Thanks for the reply, but the site is all about is https://ljm.brugergruppen.dk/vejr2:
ScreenShot434.jpg
ScreenShot435.jpg
Suddenly yesterday evening everything was all right, but now at 03:40 AM the time is wrong.

Re: Problem with date and time for update

Posted: Mon 16 Oct 2017 3:13 pm
by saratogaWX
Looking at https://ljm.brugergruppen.dk/vejr2/chec ... w=settings shows the PHP pages are getting the tags and realtime from the ./vejr2/ directory (same directory as the vejr2 site is located).

the ./vejr2/ajaxCUwx.js script shows

Code: Select all

var realtimeFile = '/realtime.txt'; //  URL location of realtime.txt relative to document root of website
so it is picking up the realtime.txt file from the document root of ljm.brugergruppen.dk
Change that to

Code: Select all

var realtimeFile = 'realtime.txt'; //  URL location of realtime.txt relative to document root of website
to have it get the realtime.txt file from the same directory (./vejr2/) as the template pages.

That's why the date/time is odd when the AJAX JavaScript does a partial page update.

Re: Problem with date and time for update

Posted: Thu 19 Oct 2017 7:06 am
by perl
Now it works perfect. Thanks for the help Ken.
Best regards
Per