Read the statement by Michael Teeuw here.
Calendar times in 24 hour format?
-
Any way to change calendar times to 24 hour? (as in the clock?)
-
Change the
timeFormat:in the config.js file in config folder so looks like this./* Magic Mirror Config * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. */ var config = { port: 8080, language: 'en', timeFormat: 12, units: 'metric',Note: I Have only copied top half of mine.
-
@jtyle6 Mine is already showing timeformat as 24, which shows the clock in 24 hour format. But calendar items are still showing 12 hour format with AM/PM
-
@dinkybluebug245 said in Calendar times in 24 hour format?:
@jtyle6 Mine is already showing timeformat as 24, which shows the clock in 24 hour format. But calendar items are still showing 12 hour format with AM/PM
ah, whoops sorry miss read the Topic.
-
Sorry for Dig this topic from grave but i have the same problem like @dinkybluebug245
I have meeting on 15:00 but calendar say its 03:00. Without PM
I have in config timeFormat: 24.
Everything work fine, only wrong time is show.
And this is bug after update to last version. -
Two things to try.
Is your
timeandtime zoneset correctly on your Pi itself?You could also try
timeFormat: 24,in the module entry of the config. -
timeFormat: 24, in calendar module not work.
How can i check is my time and timezone correctly set?
Im from Poland so i set Europe/Warsaw time in raspi-config.
My clock works correctly.When i change timeFormat to 12 calendar add PM to 03:00 so it’s correctly, but when i change to 24, PM disappear.
-
@MrEdOne said in Calendar times in 24 hour format?:
but when i change to 24, PM disappear.
That makes perfect sense. 24 hour format would NOT show AM/PM, only 12 hour format would do that.
3:00 PM in 12 hour format
1500 in 24 hour format (no PM)
-
Yes, but it won’t change 03:00 to 15:00
-
Oh ok, that’s different
It sounds like something is overriding the timeFormat: setting. Have you made any changes to the calendar.js file?
-
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!
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