Linux showing incorrect file modified time for camera video

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I recorded a video with my camera and when I open the directory containing the video files, the modified time is always wrong.



Here is a screenshot from the video clearly showing the correct time and date as provided by the camera in the bottom left corner:



enter image description here



However here is the output of ls -ltr:



brett@brett-HP-Laptop-17-bs0xx:~/Vidéos$ ls -ltr
total 9604
-rw-r--r-- 1 brett brett 9832867 avr 27 05:04 REC_0039.MOV
brett@brett-HP-Laptop-17-bs0xx:~/Vidéos$


The modified time showed by Linux is several hours behind the actual time this video was filmed. Why is this the case and how can I display the correct time in my file manager?







share|improve this question























    up vote
    0
    down vote

    favorite












    I recorded a video with my camera and when I open the directory containing the video files, the modified time is always wrong.



    Here is a screenshot from the video clearly showing the correct time and date as provided by the camera in the bottom left corner:



    enter image description here



    However here is the output of ls -ltr:



    brett@brett-HP-Laptop-17-bs0xx:~/Vidéos$ ls -ltr
    total 9604
    -rw-r--r-- 1 brett brett 9832867 avr 27 05:04 REC_0039.MOV
    brett@brett-HP-Laptop-17-bs0xx:~/Vidéos$


    The modified time showed by Linux is several hours behind the actual time this video was filmed. Why is this the case and how can I display the correct time in my file manager?







    share|improve this question





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I recorded a video with my camera and when I open the directory containing the video files, the modified time is always wrong.



      Here is a screenshot from the video clearly showing the correct time and date as provided by the camera in the bottom left corner:



      enter image description here



      However here is the output of ls -ltr:



      brett@brett-HP-Laptop-17-bs0xx:~/Vidéos$ ls -ltr
      total 9604
      -rw-r--r-- 1 brett brett 9832867 avr 27 05:04 REC_0039.MOV
      brett@brett-HP-Laptop-17-bs0xx:~/Vidéos$


      The modified time showed by Linux is several hours behind the actual time this video was filmed. Why is this the case and how can I display the correct time in my file manager?







      share|improve this question











      I recorded a video with my camera and when I open the directory containing the video files, the modified time is always wrong.



      Here is a screenshot from the video clearly showing the correct time and date as provided by the camera in the bottom left corner:



      enter image description here



      However here is the output of ls -ltr:



      brett@brett-HP-Laptop-17-bs0xx:~/Vidéos$ ls -ltr
      total 9604
      -rw-r--r-- 1 brett brett 9832867 avr 27 05:04 REC_0039.MOV
      brett@brett-HP-Laptop-17-bs0xx:~/Vidéos$


      The modified time showed by Linux is several hours behind the actual time this video was filmed. Why is this the case and how can I display the correct time in my file manager?









      share|improve this question










      share|improve this question




      share|improve this question









      asked Apr 29 at 17:37









      daloonik

      235




      235




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote













          Like all Unix-like systems, Linux stores file timestamps internally in UTC and when you get the directory listing, the timestamps are converted to whatever is the selected timezone of your session.



          If either the camera or your Linux system has incorrect timezone settings, errors like this might happen. The camera clearly had correct local time, but may have converted it to UTC incorrectly, causing incorrect timestamps; or your laptop is using a different timezone than what you expect, causing errors to the UTC -> local time conversion.



          Run date; date -u on your laptop. It will display two timestamps: local time and UTC time. If local time is correct but UTC is wrong, you have a wrong timezone and your laptop's system clock has incorrect UTC time.



          If you are looking something like a memory card taken from the camera, you might want to use a mount option to specify the timezone the camera uses: on VFAT/FAT32/exFAT filesystems, Linux assumes that the filesystem timestamps are stored using local time by default.



          The mount option tz=UTC will assume the camera uses raw UTC on its filesystem rather than any local time, or time_offset=<minutes> can be used to explicitly specify the time offset, if the camera uses something non-UTC that is different from what your laptop uses.






          share|improve this answer




























            up vote
            0
            down vote













            The file modified time on the camera files was in local time. However Linux was assuming the camera's time was in UTC and converting it into local time, hence the difference of four hours between the camera time stamp and the modified time as shown by Linux.



            Before mounting the camera, run the following command:



            timedatectl set-local-rtc 1



            Now the mounted camera shows the correct time in the file manager.



            To get the RTC back to using UTC run:



            timedatectl set-local-rtc 0






            share|improve this answer





















              Your Answer







              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "106"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: false,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );








               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f440765%2flinux-showing-incorrect-file-modified-time-for-camera-video%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              1
              down vote













              Like all Unix-like systems, Linux stores file timestamps internally in UTC and when you get the directory listing, the timestamps are converted to whatever is the selected timezone of your session.



              If either the camera or your Linux system has incorrect timezone settings, errors like this might happen. The camera clearly had correct local time, but may have converted it to UTC incorrectly, causing incorrect timestamps; or your laptop is using a different timezone than what you expect, causing errors to the UTC -> local time conversion.



              Run date; date -u on your laptop. It will display two timestamps: local time and UTC time. If local time is correct but UTC is wrong, you have a wrong timezone and your laptop's system clock has incorrect UTC time.



              If you are looking something like a memory card taken from the camera, you might want to use a mount option to specify the timezone the camera uses: on VFAT/FAT32/exFAT filesystems, Linux assumes that the filesystem timestamps are stored using local time by default.



              The mount option tz=UTC will assume the camera uses raw UTC on its filesystem rather than any local time, or time_offset=<minutes> can be used to explicitly specify the time offset, if the camera uses something non-UTC that is different from what your laptop uses.






              share|improve this answer

























                up vote
                1
                down vote













                Like all Unix-like systems, Linux stores file timestamps internally in UTC and when you get the directory listing, the timestamps are converted to whatever is the selected timezone of your session.



                If either the camera or your Linux system has incorrect timezone settings, errors like this might happen. The camera clearly had correct local time, but may have converted it to UTC incorrectly, causing incorrect timestamps; or your laptop is using a different timezone than what you expect, causing errors to the UTC -> local time conversion.



                Run date; date -u on your laptop. It will display two timestamps: local time and UTC time. If local time is correct but UTC is wrong, you have a wrong timezone and your laptop's system clock has incorrect UTC time.



                If you are looking something like a memory card taken from the camera, you might want to use a mount option to specify the timezone the camera uses: on VFAT/FAT32/exFAT filesystems, Linux assumes that the filesystem timestamps are stored using local time by default.



                The mount option tz=UTC will assume the camera uses raw UTC on its filesystem rather than any local time, or time_offset=<minutes> can be used to explicitly specify the time offset, if the camera uses something non-UTC that is different from what your laptop uses.






                share|improve this answer























                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  Like all Unix-like systems, Linux stores file timestamps internally in UTC and when you get the directory listing, the timestamps are converted to whatever is the selected timezone of your session.



                  If either the camera or your Linux system has incorrect timezone settings, errors like this might happen. The camera clearly had correct local time, but may have converted it to UTC incorrectly, causing incorrect timestamps; or your laptop is using a different timezone than what you expect, causing errors to the UTC -> local time conversion.



                  Run date; date -u on your laptop. It will display two timestamps: local time and UTC time. If local time is correct but UTC is wrong, you have a wrong timezone and your laptop's system clock has incorrect UTC time.



                  If you are looking something like a memory card taken from the camera, you might want to use a mount option to specify the timezone the camera uses: on VFAT/FAT32/exFAT filesystems, Linux assumes that the filesystem timestamps are stored using local time by default.



                  The mount option tz=UTC will assume the camera uses raw UTC on its filesystem rather than any local time, or time_offset=<minutes> can be used to explicitly specify the time offset, if the camera uses something non-UTC that is different from what your laptop uses.






                  share|improve this answer













                  Like all Unix-like systems, Linux stores file timestamps internally in UTC and when you get the directory listing, the timestamps are converted to whatever is the selected timezone of your session.



                  If either the camera or your Linux system has incorrect timezone settings, errors like this might happen. The camera clearly had correct local time, but may have converted it to UTC incorrectly, causing incorrect timestamps; or your laptop is using a different timezone than what you expect, causing errors to the UTC -> local time conversion.



                  Run date; date -u on your laptop. It will display two timestamps: local time and UTC time. If local time is correct but UTC is wrong, you have a wrong timezone and your laptop's system clock has incorrect UTC time.



                  If you are looking something like a memory card taken from the camera, you might want to use a mount option to specify the timezone the camera uses: on VFAT/FAT32/exFAT filesystems, Linux assumes that the filesystem timestamps are stored using local time by default.



                  The mount option tz=UTC will assume the camera uses raw UTC on its filesystem rather than any local time, or time_offset=<minutes> can be used to explicitly specify the time offset, if the camera uses something non-UTC that is different from what your laptop uses.







                  share|improve this answer













                  share|improve this answer



                  share|improve this answer











                  answered Apr 29 at 17:56









                  telcoM

                  10.2k11032




                  10.2k11032






















                      up vote
                      0
                      down vote













                      The file modified time on the camera files was in local time. However Linux was assuming the camera's time was in UTC and converting it into local time, hence the difference of four hours between the camera time stamp and the modified time as shown by Linux.



                      Before mounting the camera, run the following command:



                      timedatectl set-local-rtc 1



                      Now the mounted camera shows the correct time in the file manager.



                      To get the RTC back to using UTC run:



                      timedatectl set-local-rtc 0






                      share|improve this answer

























                        up vote
                        0
                        down vote













                        The file modified time on the camera files was in local time. However Linux was assuming the camera's time was in UTC and converting it into local time, hence the difference of four hours between the camera time stamp and the modified time as shown by Linux.



                        Before mounting the camera, run the following command:



                        timedatectl set-local-rtc 1



                        Now the mounted camera shows the correct time in the file manager.



                        To get the RTC back to using UTC run:



                        timedatectl set-local-rtc 0






                        share|improve this answer























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          The file modified time on the camera files was in local time. However Linux was assuming the camera's time was in UTC and converting it into local time, hence the difference of four hours between the camera time stamp and the modified time as shown by Linux.



                          Before mounting the camera, run the following command:



                          timedatectl set-local-rtc 1



                          Now the mounted camera shows the correct time in the file manager.



                          To get the RTC back to using UTC run:



                          timedatectl set-local-rtc 0






                          share|improve this answer













                          The file modified time on the camera files was in local time. However Linux was assuming the camera's time was in UTC and converting it into local time, hence the difference of four hours between the camera time stamp and the modified time as shown by Linux.



                          Before mounting the camera, run the following command:



                          timedatectl set-local-rtc 1



                          Now the mounted camera shows the correct time in the file manager.



                          To get the RTC back to using UTC run:



                          timedatectl set-local-rtc 0







                          share|improve this answer













                          share|improve this answer



                          share|improve this answer











                          answered May 1 at 11:27









                          daloonik

                          235




                          235






















                               

                              draft saved


                              draft discarded


























                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f440765%2flinux-showing-incorrect-file-modified-time-for-camera-video%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Popular posts from this blog

                              Peggy Mitchell

                              Palaiologos

                              The Forum (Inglewood, California)