KristjanESPERANTO / MMM-PublicTransportHafas

This is a module for MagicMirror² to display public transport departures.
MIT License
21 stars 6 forks source link

timeFormat in config being ignored #164

Closed elgrwo closed 7 months ago

elgrwo commented 7 months ago

Bug description Even though I have timeFormat: 24, set in the general MagicMirror config, it shows am/pm in the departure time.

One part of the problem may be: dayjs.locale(config.language);

Or this.file(node_modules/dayjs/locale/${config.language}.js),

KristjanESPERANTO commented 7 months ago

Interesting. Please try to add language: "de", to the general MagicMirror config.

elgrwo commented 7 months ago

Changing the language did change the time format, however it also changed the language 😭

Is there no way to keep my MagicMirror config in English but only change the timeFormat? My German is not very good and I would really prefer to keep the settings that way.

KristjanESPERANTO commented 7 months ago

Since we no longer use momentjs here, the value for timeFormat did not work. I have just fixed it. Now it also works with the combination language: "en" and timeFormat: 24 :slightly_smiling_face:

Let me know if it works for you too.

elgrwo commented 7 months ago

Since we no longer use momentjs here, the value for timeFormat did not work. I have just fixed it. Now it also works with the combination language: "en" and timeFormat: 24 🙂

Let me know if it works for you too.

yes, it works!! even with my strange combination 😉

thanks for your fantastic support, I really appreciate it!!