Wrong Timestamp on Saved Recordings

tonydi

n3wb
Joined
May 19, 2014
Messages
13
Reaction score
2
Hello all!

About 6 yrs ago I came here to get info on setting up some IP cameras at my home. I ended up with three DS-2CD2032-I cameras recording to a NAS running NAS4FREE. The cameras were bought from China and I learned (and have long since forgotten) all of the hacks necessary from the kind folks here. The cameras are still running firmware version V5.1.2 build 140116.

Sadly the NAS died and I grabbed an old Windows 7 machine and put my NAS drives into that box. The cameras set up the drives as SMB/CFS and everything is back to running perfectly except that all of the saved recordings have Beijing timestamps on them, not PDT times.

This wasn't an issue on the NAS4FREE box so I'm at a loss to understand why the timestamps were fine before and are wrong now.

Is there anything I can do to fix the timestamps? Is this a Windows issue? If so, I could always put NAS4FREE onto this machine.

I'd appreciate any input.
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,699
Location
New Jersey
The time and time zone need to be set in the camera. The drives have nothing to do with it, at all. Login into the camera through its' wed gui, enter the appropriate login information and it will be there, somewhere, usually under a category called ""system".
 

tonydi

n3wb
Joined
May 19, 2014
Messages
13
Reaction score
2
Already thought of that. It's set to the correct timezone for CA.

time.png

What's weird is that when the cameras format the drives, all of the folders and the "placeholder" files have the correct times. It's only when recordings start to be saved do those times change to Beijing time.
 

tonydi

n3wb
Joined
May 19, 2014
Messages
13
Reaction score
2
Tried that too. The OSD on the live view has the correct PDT time.
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,699
Location
New Jersey
Are you using a VMS for this camera or writing directly to the disk? A disk can only write what it gets from a source, with no editing. Somewhere something in between the two is funky.
 

tonydi

n3wb
Joined
May 19, 2014
Messages
13
Reaction score
2
Directly to each of the three disks, via IP.

I'm not sure if I used SMB/CIFS or NFS (leaning towards NFS) on the NAS4FREE box, but other than Linux to Windows, that would be the only difference.

I keep thinking this is some sort of issue because these cameras are using the old Chinese/English firmware. I vaguely recall having to modify a file (.dat .dav something like that), replacing a long string of characters with a different long string. But I don't remember what that was for and everything I've searched for never mentions timestamps.
 

Attachments

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,699
Location
New Jersey
I'm guessing those are Hikvision cameras and I'm not familiar with them at all. It could be a firmware problem and how they are actually encoding the date/time stamp. Were these International versions or hacked Chinese firmware cameras?
 

tonydi

n3wb
Joined
May 19, 2014
Messages
13
Reaction score
2
Right, Hikvision. They were purchased from China but at that time the firmware still displayed in English. I think later FW versions switched to Chinese and people went to great lengths to try and hack those. Since I didn't see any need for the features that changed I stuck with the FW that was working, avoiding the possibility of bricking the cameras.

I'm hoping that some of the people involved in all of this back then will see this thread and maybe point out what I'm missing.
 

jmhmcse

Pulling my weight
Joined
Dec 30, 2018
Messages
219
Reaction score
131
Location
usa
I think your your question is that while the date/time stamps within the video stream (and recording) are correct, the file's date/time stamps are off (beijing not p*t).... correct?

If yes, then what might be causing the issue is that the camera (linux) uses UTC for date/time encoding while the pc (windows) uses local time. When using NAS4FREE as the destination the date/time stamps were in accurate as it too was running linux.

You would think that HK would take this into consideration when using CIFS, but maybe not.

Going back to NAS4FREE (now XigmaNAS) is one option, another would be install an NFS server on Windows 7.

I can't guarantee linux-to-windows time conflict is -the- issue or either of the above options is a resolution, but it would seem a logical possibility.

==

obtw, you really should check the NTP time sync box. while the time is currently OK, over time the camera's clock will drift
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,699
Location
New Jersey
From what you're saying about those cameras they are, indeed, hacked firmware versions of Hikvision cameras. Maybe somewhere, someone, will have a fix for it but that will take more hacks of the firmware.
 

tonydi

n3wb
Joined
May 19, 2014
Messages
13
Reaction score
2
If yes, then what might be causing the issue is that the camera (linux) uses UTC for date/time encoding while the pc (windows) uses local time. When using NAS4FREE as the destination the date/time stamps were in accurate as it too was running linux.
Ahh, ok, that's what I was missing. That makes perfect sense, thank you!

Going back to NAS4FREE (now XigmaNAS) is one option, another would be install an NFS server on Windows 7.
Given that this box is solely for the cameras I could go back to the NAS software but then that brings into play the hack I need to address whatever the issue was with NFS and this firmware. Given that I don't jump into the recordings to look at something all that often, it's a matter of having correct time with what may be a lot of work verses just mentally adding 7 hrs to the first timestamp I want to look at. So I may take the lazy way out. :D

obtw, you really should check the NTP time sync box. while the time is currently OK, over time the camera's clock will drift
Yes, they definitely drift and each of the three drifts by a completely different amount (and direction). I used to have that checked and found that they were still off and I dug in and discovered that often the call to the NTP server would fail. I tried different servers and still found that they might be right for awhile and then one or more would be off. So a few times a month I just go in and tell each camera to sync to my computer, which I keep pretty close to spot on.

From what you're saying about those cameras they are, indeed, hacked firmware versions of Hikvision cameras. Maybe somewhere, someone, will have a fix for it but that will take more hacks of the firmware.
It's been too long for me to remember all the details, but my impression was that this firmware is essentially a stock one that Hikvision produced at that time. All of the rest of the hacking went into different areas that I wasn't concerned with so I avoided those versions. The one thing that I do remember was that bit about changing the one hex string to fix an NFS issue, but that was more of a bug fix than a true "hack".

Thanks to both of you for your help!
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,699
Location
New Jersey
Maybe consider replacing those cameras with something new that is truly an International firmware version as well from either Hik or Dahua.
 

tonydi

n3wb
Joined
May 19, 2014
Messages
13
Reaction score
2
You don't need to tempt me. :D

What I really want is at least one PTZ but I can't justify to myself, let alone my wife, spending that sort of money.
 

tonydi

n3wb
Joined
May 19, 2014
Messages
13
Reaction score
2
Just to tie up this thread, I dug around and found that the hack I had to add back when I first set up these cameras was made to the cameras' firmware. So there was no need to find that hack and apply it again before going back to NAS4FREE/XigmaNAS. So I pulled out the Windows drive, installed XigmaNAS, struggled through configuring that (I stupidly neglected to make screencaps of all of the settings in NAS4FREE last time, but not this time) and everything is back up and running.

Most importantly, the recordings' time stamps are back to PDT.

Thanks to sebastiantombs and jmhmcse for your advice!
 
Top