spitzlbergerj / MMM-TeslaLogger

Module for MagicMirror showing data from the Teslalogger or teslamate subscribed to via MQTT
GNU Affero General Public License v3.0
5 stars 3 forks source link

Timeformat (last updated) #8

Closed theskyisthelimit closed 4 years ago

theskyisthelimit commented 4 years ago

The date and time of the last message (Stand auf deutsch) is displayed at the bottom of the module. Somehow on my display the time is displayed as 3:51 instead of 15:51. Can this be configured somewhere?

In the config.js I use

  language: "de",
  timeFormat: 24,
  units: "metric",
spitzlbergerj commented 4 years ago

Please try localeStr: 'de-DE', Probably this should correct this

theskyisthelimit commented 4 years ago

It was already set like that. Is it correct that this value should show the value of the parameter teslamate/cars/1/since ? Maybe the teslamate format is causing the trouble? The value I am seeing now with MQTT Explorer is 2020-03-29T12:54:14.405132Z for teslamate/cars/1/since

spitzlbergerj commented 4 years ago

no, the date is generated as timestamp itself when receiving the MQTT telegram. The time shown is therefore the time of the last reception of an MQTT message

spitzlbergerj commented 4 years ago

The time specification is formatted via toLocaleTimeString(). I have now explicitly added the localeString there. Please test. It worked for me before

theskyisthelimit commented 4 years ago

It was still the same after the git pull but after restarting the magic mirror docker container I get 16:30 which is 1 hour off?