Incorrect time shown when I'm saving, creating files or when apps create files.

SHoover80

Dabbler
Joined
Aug 21, 2022
Messages
16
This is a difficult one. Started off with an app I'm using on my TrueNAS Scale server. It is a surveillance camera application I've been running about a year. And recently I noticed if I wanted to review previously recorded footage from my surveillance camera's. I'd end up having to go back about 6 hours from the time the app had stored the video's compared to timestamps on the camera's. I run a local NTP server to keep time/date synced with all devices on my network, I have 2 other servers running also running TrueNAS Scale configured the same working as expected. I've verified time/date on every device on my network. This specific server giving me issues, I've verified the CMOS battery was good, Bios had correct date/time. TrueNAS Scale is showing the correct date/time. The app I'm using where I first noticed the discrepency and been showing the correct date/time. And my camera's have the correct date/time. I was at a loss,

I decided to check out the actual video files stored on same device running surveillance software Shinobi app. and looking at the time stamp from the video's and comparing the time shown that the file was created in my directory. Indicated the video file was created an average of 6 hours before it was filmed. I decided to create/save empty files as a test. The test file I just created at 6PM, under properties showed it was created around 12PM. The same -6 hour difference. This is repeatedly happening to any file the system saves or that I save.

I did research through previous posts on here and the closest one I seen had simular issues, and it was solved by going through TrueNAS Scale settings and removing local NTP server, setting time/date manually. I've triend that with no success. This machine is only used for my home surveillance using Shinobi, Latest version, TrueNAS-SCALE-22.12.3.3. Doesnt appear to be anything specific to the TrueNAS Charts Shinobi app. Only issue is when files/folders are saved to TrueNAS drives, the time shows to be -6 hours off. No clue when this started, I only noticed it a couple days ago due to nature of issue. I only found out when trying to retrieve video files over network to another device that relied on file creation time. I know a couple months ago it worked as expected.


I created a short Youtube video to demonstrate the issue. https://www.youtube.com/watch?v=4ApjkVHr47Q
Dont like, Dont subscribe ;-) only posted temporarily for demonstration of issue.
 

SHoover80

Dabbler
Joined
Aug 21, 2022
Messages
16
Time is set as it should be, I even reset all settings to default in Truenas and it's still doing the same thing. In certain parts of the software it doesn't reflect the current time.
 

Attachments

  • TrueNasScale.png
    TrueNasScale.png
    61.1 KB · Views: 124
  • TrueNasScale1.png
    TrueNasScale1.png
    43.7 KB · Views: 141

SHoover80

Dabbler
Joined
Aug 21, 2022
Messages
16
I've followed steps I've found to set timezone through shell. Didn't resolve the issue.
 

Attachments

  • Screenshot 2023-08-03 213548.png
    Screenshot 2023-08-03 213548.png
    103.1 KB · Views: 145

SHoover80

Dabbler
Joined
Aug 21, 2022
Messages
16
Doing more troubleshooting I've noticed I'll get the NTP server working for a moment but doesn't sync the time. then stops working. I came across a simular thread and used this command sudo ntpd -n -g -q followed by self hosted NTP server address or 0.freebsd.pool.ntp.org and this resolves the time sync issue. Until I restart. Or if I wait a few minutes the NTP stops and show this:

sdhoover@destiny:~$ ntpq -pn
ntpq: read: Connection refused

sdhoover@destiny:~$ systemctl status ntp
× ntp.service - Network Time Service
Loaded: loaded (/lib/systemd/system/ntp.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Thu 2023-08-03 19:02:02 CDT; 5h 6min ago
Duration: 6.992s
Docs: man:ntpd(8)
Process: 28937 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS)
Main PID: 28972 (code=exited, status=255/EXCEPTION)
CPU: 76ms

I have two other servers both running TrueNAS Scale, Settings are the same, networking config is the same. The only main difference is this one is running on my old desktop PC, The other two are running on rack mount servers.
 

Attachments

  • NTPIssue1.png
    NTPIssue1.png
    206.6 KB · Views: 123
  • NTPIssue2.png
    NTPIssue2.png
    202.4 KB · Views: 76
Last edited:

SHoover80

Dabbler
Joined
Aug 21, 2022
Messages
16
I'm so glad to be using this software that's supported by it's developers and community. The response to this issue has been amazing.
 

Attachments

  • socially-awkward-cricket-11787-220739264.jpg
    socially-awkward-cricket-11787-220739264.jpg
    62.5 KB · Views: 101

ThibautK

Cadet
Joined
Aug 1, 2023
Messages
2
Recently had a similar issue, is your bios time set to UTC time? (for me that was not the case and was causing issues..)
 

SHoover80

Dabbler
Joined
Aug 21, 2022
Messages
16
Recently had a similar issue, is your bios time set to UTC time? (for me that was not the case and was causing issues..)
It has the correct time and date, but only allows me to change the time/date. Not able to select or change the timezone standard it uses. It's running on an ASUS Sabertooth 990FX Gen3 R2.0 motherboard with the latest version 250 bios.
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
Have you tried setting your TrueNAS box bios time to UTC time as @ThibautK indicated? Set the actual time zone in TrueNAS.
 
Joined
Oct 22, 2019
Messages
3,641
It has the correct time and date, but only allows me to change the time/date.
If there's no option in the BIOS for UTC time, then just assume the time in the BIOS uses UTC time.

Therefore, set the date/clock in your BIOS to reflect current UTC time (not your local time).

(Stick with America/Chicago timezone in your TrueNAS configuration, and make sure the NTP service is working correctly.)

Here is a reference for the current UTC time if you need it: https://www.utctime.net
 

SHoover80

Dabbler
Joined
Aug 21, 2022
Messages
16
Have you tried setting your TrueNAS box bios time to UTC time as @ThibautK indicated? Set the actual time zone in TrueNAS.
If there's no option in the BIOS for UTC time, then just assume the time in the BIOS uses UTC time.

Therefore, set the date/clock in your BIOS to reflect current UTC time (not your local time).

Here is a reference for the current UTC time if you need it: https://www.utctime.net
I'll give that a try, Thank you
 

SHoover80

Dabbler
Joined
Aug 21, 2022
Messages
16
I just realized three different users essentially suggested the same thing using their own way of wording it. :tongue:
Well, the way you worded it clarified it for me. As the BIOS settings had no way to change time zone and I'm not familular with working with UTC, so I had no reason previously to presume changing the time other than what my time is would help. But after changing the time to what the link you sent said UTC was. I applied and restarted it and now it appears to be working. Thank you.
 
Top