Welcome to the Cumulus Support forum.

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

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.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

trends.htm - Dates

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

trends.htm - Dates

Post by BCJKiwi »

The note at the top of the page says;
The times on the graphs are shown in your local time zone.
This seems a bit strange to me as everything else and 'normal??' practise is to display data at the station time - i.e. when it happened.

Is there a particular reason for this?
Can it be changed to just use the station times - it does not seem to make a lot of sense to me for someone in a different time zone to looking at values for say mad afternoon (highest temps but have then saying they are happening at say late evening or some other time like 3am in the morning if they are on the other side of the world (we have ex-pats in the UK and the USA looking at our site in New Zealand).
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: trends.htm - Dates

Post by steve »

It's because the dates are interpreted in the user's browser, which obviously uses the viewer's time zone. I do intend to look at this when I get a couple of free nanoseconds.
Steve
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: trends.htm - Dates

Post by BCJKiwi »

OK, that's fine - no rush - the note covers it until you get around to it.
User avatar
mcrossley
Posts: 12695
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: trends.htm - Dates

Post by mcrossley »

The way you get round this in HighCharts is to set a flag (actually it is set by default) that the supplied date/times are in UTC. They are then plotted as if they were in originating TZ. I can't see a similar option in nvd3. :(
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: trends.htm - Dates

Post by steve »

It seems it can do local or UTC, but not server (or a specified TZ):

https://github.com/mbostock/d3/wiki/Time-Scales

This thread has a workaround, but I will have to re-read it until I understand it:

https://groups.google.com/forum/#!topic ... WmP9Npv2Go
Steve
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: trends.htm - Dates

Post by steve »

A thought: I am currently generating the timestamps using the difference between now in UTC and 1/1/1970 (because I believed that was the correct way to generate javascript timestamps). I am using the 'local time' axis in d3.

If I change MX to use local time rather than UTC for the timestamps, and I use the utc axis type in d3, presumably it will do no conversion (assuming the timestamps are in UTC) so the charts will display server time?
Steve
User avatar
mcrossley
Posts: 12695
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: trends.htm - Dates

Post by mcrossley »

Sounds about right. For the MySQL data I just take the logged time, convert to Unix timestamp (secs since 1970), then x1000 to javascript time (msecs since 1970) with no regard to TZ. Then display as UTC on the client to prevent any conversion at that end.
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: trends.htm - Dates

Post by steve »

I've implemented this now, so I could do with a few people around the world having a look to see if the time is displayed as server time (I'm on UTC). The time at the end of the scale should correspond to the time the page was updated.

http://sanday.org.uk/weather/trends.htm
Steve
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: trends.htm - Dates

Post by nitrx »

steve wrote:I've implemented this now, so I could do with a few people around the world having a look to see if the time is displayed as server time (I'm on UTC). The time at the end of the scale should correspond to the time the page was updated.

http://sanday.org.uk/weather/trends.htm
Times are displayed as my local time UTC+1
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: trends.htm - Dates

Post by steve »

Oh well, it was worth a try.
Steve
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: trends.htm - Dates

Post by nitrx »

steve wrote:Oh well, it was worth a try.
Is that wrong? I'm not in your timezone
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: trends.htm - Dates

Post by steve »

Yes - it should be displaying the times in my time zone, i.e. UTC.
Steve
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: trends.htm - Dates

Post by nitrx »

Ah yes ofcourse sorry :groan:
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: trends.htm - Dates

Post by steve »

Perhaps as I no longer intend to make MX a 'paid for only' product I should switch to HighCharts. I think I qualify as a 'not for profit'.
Steve
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: trends.htm - Dates

Post by steve »

After a bit more fiddling, I think I have it working now, for my data at least, which is currently timestamped with UTC. My trends page should now show UTC wherever it is viewed from. What I need to test now is generating data in a non-UTC time zone and see if that still works. I think it should...
Steve
Locked