Read the statement by Michael Teeuw here.
Default Clock wrong after update
-
@sdetweil said in Default Clock wrong after update:
which means it only uses its own config values, not the global config.
This is what I was correcting. ;)
-
@BKeyport but he said,
changing it in the module config did NOT work
but
changing it in the GENERAL config DID work…and it was NOT set in the original config he was using prior to the upgrade
-
@BKeyport said in Default Clock wrong after update:
This is what I was correcting.
I don’t understand…
what I said was
this module only adjusts the timezone when
config :{ timezone: '??????', }in its module definition
NOT when its set in the global configuration, (before modules defined)
timeFormat: 24, units: "metric", timezone:"UTC", <--- added this for testing, value NOT set in module config modules: [so I don’t see what you are ‘correcting’
-
S sdetweil referenced this topic on
-
@sdetweil thats correct - when I changed timezone from ‘null’ to ‘America/New_York,’ the module did not work at all. When I went into the MM config.js and added the timezone line, it worked.
Which now I realize is also a bit frustrating because one of my modules also shows sunrise/sunset times, and thats still off (EST + 4 hrs).
-
@sdetweil and also, yes. prior to the upgrade, my general config was NOT set to a TZ prior to the upgrade. I
-
@drstang said in Default Clock wrong after update:
my general config was NOT set to a TZ prior to the upgrade.
correct… as there is no general timezone property
-
@sdetweil and what also confuses me is if I access the mirror via a web browser, the times are right!
-
@drstang I understand and agree with that…
the clock code runs in the browser… so one can only assume that the
moment code running in the browser is different between instances… -
@sdetweil Curious - are we still using Moment.js in default clock? I’ve heard issues relating with Moment and newer code - I think it might be failing to the point of no return.
-
@BKeyport AND it looks like we SHIP a copy… that is PROBABLY the problem

-
@sdetweil Makes sense - and certainly frustrating, as I realize I’m having issues with other modules that show times as well (showing sunrise/sunset, tide charts).
Any suggestions on a fix - as it is essentially making my MM unusable since my ‘main’ modules rely on time…
-
@drstang I am away til Tuesday.
not sure what a fix would be
-
@sdetweil I am a total novice at JS - but I fixed my modules by adjusting the configs - I incorporated moment-timezone.js and changed my code from ‘.local()’ to ‘.tz(America/New_York)’ Seems moment was having issues with the ‘local’ part of the code.
A bit annoying, and I’m sure another way could have been used, but the modules are at least showing correct time now!
-
@drstang Ahh, perhaps a forgotten requirement. It seems clear we need to get rid of Moment.js
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