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:
@@ -10,6 +10,31 @@ export const showDate = (sofort) => {
|
||||
|
||||
}
|
||||
|
||||
/* ToDo:
|
||||
// Alle Minute die ktuelle Urzeit anzeigen und
|
||||
// den Plot für Tages - und Wochendaten updaten.
|
||||
// Alle 'refreshRate' plus 15sec die Grafiken neu zeichnen
|
||||
// Die Funktion wird alle Sekunde aufgerufen !
|
||||
//
|
||||
function showUhrzeit(sofort) {
|
||||
var d = moment() // akt. Zeit holen
|
||||
if (sofort || (d.second() == 0)) { // Wenn Minute grade um
|
||||
$('#h1uhr').html(d.format('HH:mm'));
|
||||
$('#subtitle').html(d.format('YYYY-MM-DD')); // dann zeit anzeigen
|
||||
}
|
||||
if (((d.minute() % refreshRate) == 0) && (d.second() == 15)) { // alle ganzen refreshRate Minuten, 15sec danach
|
||||
console.log(refreshRate, 'Minuten um, Grafik wird erneuert');
|
||||
if ((aktsensorid != 'map') && (doUpdate == true)) { // Wenn nicht die Karte, dann
|
||||
doPlot('oneday',startDay); // Tages- und
|
||||
doPlot('oneweek',startDay); // Wochenplot erneuern
|
||||
}
|
||||
else {
|
||||
fetchAktualData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
export const formatJSDate = (d) => {
|
||||
return DateTime.fromJSDate(d).toFormat('yyyy-LL-dd HH:mm:ss')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user