Author Topic: Date problems in wxstatus.php  (Read 795 times)

0 Members and 1 Guest are viewing this topic.

Offline FinPat

  • Member
  • *
  • Posts: 3
    • Patte's Homepage
Date problems in wxstatus.php
« on: February 15, 2012, 11:43:02 PM »
Hello

As I'm new o this PHP and so on i haven't figured out where the wxstatus.php takes it dates from.
As it is displaying this all the time: Cumulus weather data NOT Current 369268:38: > 0:05:15  01/01/1970 02:00

Have tried now for several days to go through all files but cant find the 1970 date anywhere in any file.
I was just thinking if i had the wrong code somewhere and it takes this as a default value.

I'm using having the site on following Address: http://www.saunalahti.fi/~pvuorio/realtime/index.php

Looking forward to get the time correct.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9244
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Date problems in wxstatus.php
« Reply #1 on: February 16, 2012, 12:57:01 AM »
Hi,

I think the issue is in your Settings.php.  Your CUtags.php?sce=dump shows
Code: [Select]
$WX['date'] = '2/16/2012'; while your Settings.php has
Code: [Select]
$SITE['WDdateMDY'] = false; // for weather software date format of month/day/year.  =false for day/month/year which expects the date to be in day/month/year format.

Change it to
Code: [Select]
$SITE['WDdateMDY'] = true; // for weather software date format of month/day/year.  =false for day/month/year to match what Cumulus is putting in the $WX['date'] field (which is in month/day/year format)

The 1970 date just indicates an invalid date was used in processing.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline FinPat

  • Member
  • *
  • Posts: 3
    • Patte's Homepage
Re: Date problems in wxstatus.php
« Reply #2 on: February 16, 2012, 01:22:29 AM »
Thanks

That solved the problem.

Now i will tackle the rest of the modifications.

 

anything