georg wrote: ↑Thu Jan 11, 2018 7:33 pm
Noticed that the popup on the block shows the correct time.
It is only the block it self that differs. (+1 hour ahead)
Hi georg
Your "big" graph looks fine to me. Time is now 20:58 and latest record from 20:55
Time on x-axis on the right is 21:00
http://vejr.arloese.dk/template/pages/station/graph.php
Inspector gives this option:
Highcharts.setOptions({
global: {
useUTC: true
},
lang: {
months: ['Januar', 'Februar', 'Marts', 'April', 'Maj', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'December'],
shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'],
weekdays: ['Søn', 'Man', 'Tir', 'Ons', 'Tor', 'Fre', 'Lør'],
resetZoom: ['Standard zoom']
}
});
But this is one hour ahead:
http://vejr.arloese.dk/template/indexDesktop.php
Inspector gives this option:
Highcharts.setOptions({
global: {
useUTC: true
},
lang: {
months: ['Januar', 'Februar', 'Marts', 'April', 'Maj', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'December'],
shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'],
weekdays: ['Søn', 'Man', 'Tir', 'Ons', 'Tor', 'Fre', 'Lør'],
resetZoom: ['Standard zoom']
}
});
Inspector also finds this option:
Highcharts.setOptions({
global: {
useUTC: false,
timezoneOffset: -60
},
lang: {
months: ['Januar', 'Februar', 'Marts', 'April', 'Maj', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'December'],
shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'],
weekdays: ['Søn', 'Man', 'Tir', 'Ons', 'Tor', 'Fre', 'Lør'],
resetZoom: ['Standard zoom']
}
});
Maybe you wanna have a look at the timezone-option:
https://api.highcharts.com/highcharts/global.timezone
Requires moment.js but user just have to type in location and Highcharts takes care of the rest (also at DST-change).
Kind Regards