alltopafi/MMM-DateCounter

eventStartTime doesn't display correctly on times < 12:00

Opened this issue · 4 comments

if I configure the following:
{
module: "MMM-DateCounter",
position: "top_center",
config: {
updateInterval: 60000,
eventDate: "2023-05-26",
eventStartTime: "8:15",
eventTitle: "Last Day of School!",
showLongCountdown: true,
longCountdownFormat: "year,month,week,day,hour,minute",
longCountdownAutoSize: false,
}
}

I see image #1.
image#1
It appears that it wont properly display the hours.
however if i configure this:
{
module: "MMM-DateCounter",
position: "top_center",
config: {
updateInterval: 60000,
eventDate: "2023-05-26",
eventStartTime: "12:15",
eventTitle: "Last Day of School!",
showLongCountdown: true,
longCountdownFormat: "year,month,week,day,hour,minute",
longCountdownAutoSize: false,
}
}
i see image #2

image#2

I plugged in both configs into a new install of MM and saw the days, hours, and minutes in both.
Screen Shot 2023-05-21 at 21 01 52

I wonder if this might come down to dependency versions, although it is my understanding that it would be latest by default.

I am running node version 18.7.0 can find yours with node --version

Moment is the only library I am pulling in and mine was at 2.29.4.

I am not sure how you are running magic mirror but if you run it as server npm run server and open the debug tools for the browser and run onsole.log(moment.version) it should print the version number. If those are out of sync with mine I can try and reproduce using those versions.

node --version comes back with v16.19.1
console.log(moment.version) comes back with 2.29.4

Thanks for looking in to this

Sorry for the delay I was out of town unexpectedly, I tried this morning on on version 16.19.1 I am still seeing it rendered correctly. What version of magic mirror are you using?

Sorry it took so long to reply! I have been busy as well.
package.json shows v2.23