Linux showing incorrect file modified time for camera video

Clash 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:

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?
video
add a comment |Â
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:

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?
video
add a comment |Â
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:

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?
video
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:

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?
video
asked Apr 29 at 17:37
daloonik
235
235
add a comment |Â
add a comment |Â
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.
add a comment |Â
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
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
answered Apr 29 at 17:56
telcoM
10.2k11032
10.2k11032
add a comment |Â
add a comment |Â
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
add a comment |Â
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
add a comment |Â
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
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
answered May 1 at 11:27
daloonik
235
235
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password