Read the statement by Michael Teeuw here.
Calendar times in 24 hour format?
-
Nope. A search only where is a timeformat in js but my knowledge is to small. :)
-
Are you typing
timeformat? That won’t work.It has to be
timeFormatwith a capitalF.Wait a minute, the only options for
timeFormatin the calendar module areabsoluteorrelative -
But it not change anything.
With absolute and relative is the same. -
It has to be
timeFormatwith a capitalF. And at the top of your config also/* Magic Mirror Config * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. */ var config = { port: 8080, language: 'en', timeFormat: 24, units: 'metric', -
Yes. I have everywhere timeFormat. on a top of config and in calendar module with capital F
-
I give up. I don’t know where is error.
-
@MrEdOne
timeFormatuses the formatting of your operating system.
When “24” is configured the format “hh:mm” is returned. Which is exactly, what you are looking for.
Here is the code snippet from calender.js:switch (config.timeFormat) { case 12: { moment.updateLocale(config.language, { longDateFormat: { LT: "h:mm A" } }); break; } case 24: { moment.updateLocale(config.language, { longDateFormat: { LT: "hh:mm" } }); break; }What do you get, when typing
datein your console?
If it’s not in displayed in a format of 24h, change the setting of your OS.Maybe this helps?
-
Here is output from
datepi@MagicMirror:~ $ date wto, 25 lip 2017, 20:59:48 CESTYes in
12, but in24I have 03:00 instead 15:00 -
I think there is simply an understanding problem. You wrote:
“When i change timeFormat to 12 calendar add PM to 03:00 so it’s correctly, but when i change to 24, PM disappear.”So, if I’m interpreting this right, you are looking for something that isn’t the usual case. You want to display something like: “20:59 PM”
Is this correct? -
This post is deleted! -
Is your google calendar in the correct time zone?
-
You mean calendar on Google website?
But everything work correctly until lastest update of mm -
Then I have no idea. Sorry…
-
Thx for response.
-
i have the same problem, maybe I have time on the weekend for more test.
For me it is really ugly -
-
Hi
I also had this problem. The problem is that the time format string in modules/default/calendar/calendar.js is wrong for 24h setup.
Find these lines and change lower case
hhintoHin time format string.case 24: { moment.updateLocale(config.language, { longDateFormat: { LT: "H:mm" // FIX here: was "hh:mm" } }); break; }This was already fixed in development branch: https://github.com/MichMich/MagicMirror/pull/943/files
-
Hi,
I am still having this problem. I checked everything, the config file is correct, my localization of the Pi itself is ok and the changes in the calendar.js have already been made. I am still getting the calendar dates in 12h format without “A” and “P”, and I want them in “15:00” time format. Any Ideas left, how to fix this?
Thank you!
-
@MarkusBe said in Calendar times in 24 hour format?:
Any Ideas left, how to fix this?
Quick fix is to edit this in the module:

Or move to the developers branch of MM
-
THANK YOU! That was the case! Haven’t seen this… Now it works!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login