MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Default Clock wrong after update

    Scheduled Pinned Locked Moved Solved Troubleshooting
    26 Posts 4 Posters 9.0k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      drstang
      last edited by

      Hi ,

      After the newest MM update, the clock module is displaying UTC time, despite my RPi config set to EST.

      Interestingly, when I head to my MMs IP address from a separate computer, the clock is correct.

      Any ideas? Thanks!

      S 1 Reply Last reply Reply Quote 0
      • BKeyportB Offline
        BKeyport Module Developer @drstang
        last edited by

        @drstang does setting the timezone config option adjust it ?

        https://docs.magicmirror.builders/modules/clock.html#configuration-options

        The "E" in "Javascript" stands for "Easy"

        D 1 Reply Last reply Reply Quote 0
        • S Do not disturb
          sdetweil @drstang
          last edited by sdetweil

          @drstang another user had a similar problem with the calendar…
          rebuilt with a different pi and the problem went away…

          lets try this

          pm2 stop all  (or stop MM if you didn't use pm2) 
          cd ~
          rm -rf .config/Electron
          pm2 start all
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          D 1 Reply Last reply Reply Quote 0
          • D Offline
            drstang @sdetweil
            last edited by

            @sdetweil Thanks for the reply. Unfortunately - no luck. Still displaying UTC instead of EST.

            S 1 Reply Last reply Reply Quote 0
            • S Do not disturb
              sdetweil @drstang
              last edited by sdetweil

              @drstang thx… and you are certain the SYSTEM timezone is set to EST

              i can’t upload a pic of the config page on the pi… weird

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              D 1 Reply Last reply Reply Quote 0
              • D Offline
                drstang @sdetweil
                last edited by

                @sdetweil Yep - did it several times to make sure!

                And the Mirror will show EST when I access it via a web browser!

                BKeyportB 1 Reply Last reply Reply Quote 0
                • BKeyportB Offline
                  BKeyport Module Developer @drstang
                  last edited by

                  @drstang does setting the timezone config option adjust it ?

                  https://docs.magicmirror.builders/modules/clock.html#configuration-options

                  The "E" in "Javascript" stands for "Easy"

                  D 1 Reply Last reply Reply Quote 0
                  • D Offline
                    drstang @BKeyport
                    last edited by drstang

                    @BKeyport thanks but unfortunately that does not work either - it results in the clock module not even loading (unless there was something else I should have adjusted)…

                    EDIT: I realized I changed the modules config initially, which didn’t work. But I changed the main config (duh - reading is key) and added the config/timezone line, which worked!! thank you!

                    BKeyportB S 2 Replies Last reply Reply Quote 0
                    • BKeyportB Offline
                      BKeyport Module Developer @drstang
                      last edited by

                      @drstang At least you can override it for now…

                      The "E" in "Javascript" stands for "Easy"

                      1 Reply Last reply Reply Quote 0
                      • R Offline
                        Richard238
                        last edited by

                        Just updated my MM, clock is showing 18:13 when it’s 11:54…

                        1 Reply Last reply Reply Quote 0
                        • S Do not disturb
                          sdetweil @drstang
                          last edited by sdetweil

                          @drstang I don’t understand this, the code does

                          		if (this.config.timezone) {
                          			now.tz(this.config.timezone);		
                          

                          which means it only uses its own config values, not the global config.

                          when I set it like this

                          		{
                          			module: "clock",
                          			position: "top_left",
                          			config:{
                          				displaySeconds:false,
                          				timezone:"UTC"
                          			}
                          		},
                          

                          it correctly changed the displayed time from 08 (us central time) to 13

                          if I set it like this

                          	timeFormat: 24,
                          	units: "metric",
                          	timezone:"UTC",
                          	modules: [
                          

                          it did not change the displayed time (as expected)

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          BKeyportB 1 Reply Last reply Reply Quote 0
                          • BKeyportB Offline
                            BKeyport Module Developer @sdetweil
                            last edited by BKeyport

                            @sdetweil Correction to your statement. timezone is set to null by default. timezone: null, - therefore, that if line would evaluate to false unless you override with timezone config item.

                            The "E" in "Javascript" stands for "Easy"

                            S 2 Replies Last reply Reply Quote 0
                            • S Do not disturb
                              sdetweil @BKeyport
                              last edited by

                              @BKeyport correct,

                              so a ‘forced’ timezone would not be set

                              this is the same code as before.

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              BKeyportB 1 Reply Last reply Reply Quote 0
                              • BKeyportB Offline
                                BKeyport Module Developer @sdetweil
                                last edited by

                                @sdetweil

                                @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. ;)

                                The "E" in "Javascript" stands for "Easy"

                                S 1 Reply Last reply Reply Quote 0
                                • S Do not disturb
                                  sdetweil @BKeyport
                                  last edited by

                                  @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

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

                                  D 2 Replies Last reply Reply Quote 0
                                  • S Do not disturb
                                    sdetweil @BKeyport
                                    last edited by

                                    @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’

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    1 Reply Last reply Reply Quote 0
                                    • S sdetweil referenced this topic on
                                    • D Offline
                                      drstang @sdetweil
                                      last edited by

                                      @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).

                                      1 Reply Last reply Reply Quote 0
                                      • D Offline
                                        drstang @sdetweil
                                        last edited by

                                        @sdetweil and also, yes. prior to the upgrade, my general config was NOT set to a TZ prior to the upgrade. I

                                        S 1 Reply Last reply Reply Quote 0
                                        • S Do not disturb
                                          sdetweil @drstang
                                          last edited by

                                          @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

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

                                          D 1 Reply Last reply Reply Quote 0
                                          • D Offline
                                            drstang @sdetweil
                                            last edited by

                                            @sdetweil and what also confuses me is if I access the mirror via a web browser, the times are right!

                                            S 1 Reply Last reply Reply Quote 0
                                            • S Do not disturb
                                              sdetweil @drstang
                                              last edited by

                                              @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…

                                              Sam

                                              How to add modules

                                              learning how to use browser developers window for css changes

                                              BKeyportB 1 Reply Last reply Reply Quote 1

                                              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
                                              • 1
                                              • 2
                                              • 2 / 2
                                              • First post
                                                Last post
                                              Enjoying MagicMirror? Please consider a donation!
                                              MagicMirror created by Michael Teeuw.
                                              Forum managed by Sam, technical setup by Karsten.
                                              This forum is using NodeBB as its core | Contributors
                                              Contact | Privacy Policy