Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

This day last year page

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

bigmac
Posts: 159
Joined: Wed 13 May 2009 9:35 am
Weather Station: Davis Vantage Pro 2 Wireless
Operating System: Raspbian wheezy
Location: Nr Ilkley, West Yorks, UK
Contact:

Re: This day last year page

Post by bigmac »

I think I have discovered a slight problem caused by where I host my website.
When I have started to run specific SQL queries, I noticed that incorrect data was being returned at certain times.
I have narrowed this down to the fact that Glovine host my website and they are 10 hours ahead of me in the UK.
So, when I run a query at say 11.00am UK time for Max temp for this day last year, the figure is correct, but if I run the same query at 8.00pm UK time, data is returned for "tomorrow last year".
Investigating this more, it is clearly to do with the time of the MySQL server, but I don't appear to be able to change this through the Glovine control panel.
I've tried several different methods of setting the timezone in my PHP script as suggested by Google searches, but none seemed to have any effect.
Has anyone encountered similar problems before?
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: This day last year page

Post by mcrossley »

Tricky because you always want the 'day' to be UK time, the server will be using ?Aussy time.

I'd use UTC date/time in PHP and in your SQL select statment and add the hour offset for BST - not sure if PHP can do that for you or you have to write your own routine to figure out if BST currently applies.
User avatar
mikechristelow
Posts: 165
Joined: Wed 01 Feb 2012 9:33 pm
Weather Station: Watson W8681 (solar)
Operating System: Windows XP SP3
Location: Crewe, Cheshire
Contact:

Re: This day last year page

Post by mikechristelow »

Hi Steve
Can you give a link to an example of that? One of the things I was going to add was a set of web tags with daily stats (the sort of stuff that goes into dayfile.txt) that would be accessible via a "day=n" parameter (and "month=n" etc), so you could get a particular value for n days ago, up to a year ago (e.g. <#dailyhightemp day=365>); rather like the 'recent history' tags I introduced in build 1033. There have often been complaints that Cumulus was lacking in that sort of data compared to other software, and it took quite a bit of work to finally provide it. But it doesn't look like anyone was interested in it after all, so I put the "daily" version on hold.
I spent quite a lot of time creating a page to show today / yesterday / one year ago, with a lot of help from others! I was chuffed with the result which has served my purposes well. However, I'd also like to be able to show a version of the "today" dayfile values but for a specified historic date, which seems to be what you were referring to above. Is this still something you're considering (and does anyone have any existing means of doing this?)?
http://www.christelow.co.uk
“It's snowing still," said Eeyore gloomily.
"So it is."
"And freezing."
"Is it?"
"Yes," said Eeyore. "However," he said, brightening up a little, "we haven't had an earthquake lately.”

User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: This day last year page

Post by steve »

Yes, it's still something I intend to add at some point; I don't know when that will be.
Steve
Post Reply