Using and showing always local time
routes/api.js
- console.log deleted
public/javascripts/global.js
- made 'params' to const
- added setNoUTC in main
public/javascripts/showcharts.js
- added setNiUTC to set global at highcharts
package.json
- added luxon
"version": "3.0.4",
"date": "2023-04-24 18:00 UTC",
This commit is contained in:
@@ -19,7 +19,7 @@ export async function showChart(params, typ, container) {
|
||||
function form() {
|
||||
for (let item of tabtable) {
|
||||
if (item.type === typ) {
|
||||
const d = DateTime.fromMillis(this.x, {zone: 'utc'})
|
||||
const d = DateTime.fromMillis(this.x)
|
||||
const d1 = d.plus({days: 1})
|
||||
let fmt = d.toFormat(item.dformat)
|
||||
if (((typ === 'daynight') && (this.series.name.startsWith('N'))) || (typ === 'lden')) {
|
||||
@@ -112,3 +112,11 @@ export const loadAll = async (params, start = 2) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const setNoUTC = () => {
|
||||
Highcharts.setOptions({
|
||||
global: {
|
||||
useUTC: false // Don't use UTC on the charts
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user