RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    How to set time in retroarch?

    Scheduled Pinned Locked Moved Help and Support
    retroarch
    11 Posts 4 Posters 22.1k Views
    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.
    • mediamogulM
      mediamogul Global Moderator @sorinu26
      last edited by mediamogul

      @sorinu26

      You'll need an internet connection, as the Raspberry Pi doesn't have a real-time clock. You can set it to check the time and set it on each boot using raspi-config, accessible in the 'RetroPie' menu of Emulation Station. From there, you'll set your timezone under 'Internationalisation Options'.

      Edit: Once set, the time should be correct in RetroArch, as well as anything else that calls out to the system for date and time.

      RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

      S 1 Reply Last reply Reply Quote 2
      • glennlakeG
        glennlake @sorinu26
        last edited by

        @sorinu26 If you are connected to the internet you can try this. First you need to install "rdate". Then place this line in file /etc/rc.local. "sudo rdate -n -4 time-a.nist.gov &" just before the "exit 0" line. Sometimes it will take a few times to connect. If you have trouble connecting you can go to this site and try other time servers. "http://tf.nist.gov/tf-cgi/servers.cgi" I hope this works for you. You need to be at the command line or ssh into your pi to do this.

        1 Reply Last reply Reply Quote 0
        • S
          sorinu26 @mediamogul
          last edited by

          @mediamogul Thanks a lot! It worked!

          glennlakeG 1 Reply Last reply Reply Quote 0
          • glennlakeG
            glennlake @sorinu26
            last edited by

            @sorinu26 What is nice about editing the rc.local file is if you are on line it will connect to the nist server and reset the time every time you boot your pi.

            mediamogulM 1 Reply Last reply Reply Quote 0
            • mediamogulM
              mediamogul Global Moderator @glennlake
              last edited by mediamogul

              @glennlake

              The built-in raspi-config setting is also done on on every boot. In fact, any automatic method for setting date and time on the Pi has to do this, due the lack of a real-time clock in the hardware.

              RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

              glennlakeG 1 Reply Last reply Reply Quote 0
              • glennlakeG
                glennlake @mediamogul
                last edited by

                @mediamogul Thanks for the update. I had an install of Kodi on a pi3 and it would not update the time when I booted up even when I setup my timezone using raspi-config after a few days so I started using the rc.local script to make sure. They must have improved.

                mediamogulM 1 Reply Last reply Reply Quote 0
                • mediamogulM
                  mediamogul Global Moderator @glennlake
                  last edited by

                  @glennlake

                  Thank you for the alternative. I was unaware of rdate and there are a few projects I have in mind for the future that will likely need it.

                  RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                  glennlakeG edmaul69E 2 Replies Last reply Reply Quote 0
                  • glennlakeG
                    glennlake @mediamogul
                    last edited by

                    @mediamogul Your very welcome. rdate can be used in most linux install.

                    1 Reply Last reply Reply Quote 0
                    • edmaul69E
                      edmaul69 @mediamogul
                      last edited by

                      @mediamogul i have an rtc running on my pi. I still need to test games in lr-gambatte to see if it works for the saves. I keep forgetting to test.

                      mediamogulM 1 Reply Last reply Reply Quote 0
                      • mediamogulM
                        mediamogul Global Moderator @edmaul69
                        last edited by mediamogul

                        @edmaul69

                        Come to think of it, I have one too as part of a multi-function Pi hat that someone gave me last Christmas. I haven't tried it out either. There's really no reason why they wouldn't work with any of the software after being added.

                        RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                        Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.