5d10f681ea
actions/getsensorData.js - interpret given date/time as local time and convert ist to UTC for database databases/influx.js - log for 'read' added utilities/logit.js - print time in local time sensorspecials/noise.js - print starttime im options as local time - remove 'zone:utc' from every time function
17 lines
354 B
JavaScript
17 lines
354 B
JavaScript
import { DateTime} from 'luxon'
|
|
|
|
const MOCHA_TEST = process.env.MOCHA_TEST || false
|
|
|
|
export function logit(str) {
|
|
if(MOCHA_TEST) return
|
|
let s = `${DateTime.now().toISO()} => ${str}`;
|
|
console.log(s);
|
|
}
|
|
|
|
export function logerror(str) {
|
|
if(MOCHA_TEST) return
|
|
let s = `${DateTime.toISO()} => *** ERROR *** ${str}`;
|
|
console.log(s);
|
|
}
|
|
|