You think you know it, you do it, but you're wrong

saltwater

Getting comfortable
Joined
Oct 6, 2019
Messages
488
Reaction score
633
Location
Melbourne, Australia
Ok, as the title suggests, it doesn't matter how old you get or how experienced you think you are, stuff-ups happen and when they do it hits you like a ton of bricks; what were you thinking.

From me, nothing earth shattering but it's peeved me off none-the-less.

I have 11 Dahua/Andy cameras running, connected back to my dedicated Blue Iris computer. So far so good.

I let the camera imprint the date/time stamp in the video feed. So far so good.

All the cameras, every 10 mins synchronise their time with the Blue Iris computer. So far so good.

The Blue Iris computer has the 'NetTime' program installed and working to keep the correct computer time. So far so good.


Why at each camera did I activate the daylight savings date settings, by entering the start and end date of daylight savings? Overnight our clocks reverted to normal time. First thing this morning I checked in via my phone app expecting to see the correct time, they were all ahead by one hour. Two stuff-ups, I was a day out with the ending of daylight savings; had I not checked in today, and checked in the following day, I would have been none-the-wiser. It then dawned on me that there was absolutely no reason to enable the daylight savings setting in each camera if at the same time the cameras were synchronising to the Blue Iris timeserver every 10 minutes.

Anyone else fess up to mild or simple stuff-ups?
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,145
Reaction score
49,018
Location
USA
NetTime works internally with UTC (Universal Time) and doesn't have any code for handling daylight savings or time zones.

If I do not enable DST in my cameras, then they are off an hour 6 months out of the year.

I suspect your settings in the camera were off and at some point your time will be messed up again.
 

saltwater

Getting comfortable
Joined
Oct 6, 2019
Messages
488
Reaction score
633
Location
Melbourne, Australia
As I said, my daylight setting was off by one day, that was problem number one. My Blue Iris computer correctly, overnight, automatically, reverted to normal time.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,145
Reaction score
49,018
Location
USA
Right, but you said "that there was absolutely no reason to enable the daylight savings setting in each camera if at the same time the cameras were synchronising to the Blue Iris timeserver every 10 minutes" but you have to or your cameras will be off an hour 6 months out of the year.

Or I am doing it wrong LOL. But if I do not enable DST, then mine are off an hour 6 months out of the year.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,145
Reaction score
49,018
Location
USA
I don't think you are using the NetTime then.

The NTP checkbox checked means it is pointing to my NetTime server on my BI computer.

If I uncheck DST and hit save and then refresh, it goes backwards an hour.

If I uncheck both boxes (DST and NTP), then it will sync with the computer, but I believe that is then giving the camera internet access because why else go thru the effort of running NetTime if simply using the Sync PC option works?

Are you saying that if you do not check DST then you cameras stay in sync throughout the entire year?

1648945278632.png

Others using NetTime - @looney2ns, @sebastiantombs, @SouthernYankee - help explain this LOL.
 

Mike A.

Known around here
Joined
May 6, 2017
Messages
3,837
Reaction score
6,412
I just had to fix a couple of mine with the recent change. While they all were using my local time server (NetTime), for those where I had not set DST on the cams I had to do so. Otherwise, they were an hour behind.

As wittaj said, NTP is using UTC. There's no DST in UTC and no adjustment for DST in NetTime (as far as I know anyway). So you need to make that adjustment somewhere else. The only somewhere else for that will be at the individual device in most cases.

I guess you could just set the time zone to be ahead an hour manually if you wanted and let the cams all use that to avoid having to go into each cam.

Edit to add:
I just checked a couple of mine again. If I uncheck DST on the cam, then it reverts back to being an hour earlier.
 
Last edited:

saltwater

Getting comfortable
Joined
Oct 6, 2019
Messages
488
Reaction score
633
Location
Melbourne, Australia
Are you saying that if you do not check DST then you cameras stay in sync throughout the entire year?
Yes. I unchecked the DST setting, retained the NTP setting, clicked save, and instantly the date/time stamp on my Blue Iris feed reverted to normal time. Admittedly, the current time, next to the camera 'Sync PC' button didn't change instantly, not sure why that was, maybe that required a webpage refresh.
 

saltwater

Getting comfortable
Joined
Oct 6, 2019
Messages
488
Reaction score
633
Location
Melbourne, Australia
The NTP checkbox checked means it is pointing to my NetTime server on my BI computer.
This line made me think. Yes, I'm setup the same, it points to the Nettime server on my BI machine. So, the time is extracted directly from the NetTime program and not the computer clock, if that makes sense. But, the NetTime program doesn't have any reference or setting to timezones, so it must gather it from the Windows regional date/time function. During our daylight-saving period, just ended, my computer clock correctly accounted for the one hour ahead and this morning after the change the computer clock and Nettime clock correctly reverted to normal time. I'll revisit this in six months time.
 

saltwater

Getting comfortable
Joined
Oct 6, 2019
Messages
488
Reaction score
633
Location
Melbourne, Australia
As you can see, according to my Windows Date Time settings, the time service is off, and I confirm that at the Services page where it's indicated as disabled. So NetTime keeps the computer's time in sync and according to my time zone. You will also note that the last time the Windows did a time sync was in 2020. I have checked 'Adjust for daylight saving time automatically' and that worked for me the other day. The only thing that is outside my control is where Windows gets the daylight savings dates from, but it seems to work.

2022-04-04-WindowsDateTimeSetting.PNG
 

Mike A.

Known around here
Joined
May 6, 2017
Messages
3,837
Reaction score
6,412
Mine works the same as you say on the Windows and NetTime side (even with automatic time set turned on). Which is as it should be according to the FAQs on NetTime's site:

NetTime is syncing, but the time is out by an hour - e.g. Daylight savings time isn't be honoured correctly:

NetTime works internally with UTC (Universal Time) and doesn't have any code for handling daylight savings or time zones. As long as Windows is configured correctly, it should automatically handle daylight savings changes for you. If Windows isn't handling it correctly, it most likely needs to be updated...
BUT unless I check DST on the cam, it comes up an hour off. I can watch it switch back and forth as I toggle the checkbox.

See below with all shown (2:47 am on BI server and NetTime, 1:47 am after unchecking DST on cam):



Edit to add:
I checked several different Dahua, Hikvision, and Amcrest cams and they all appear to work this same way - no DST offset unless selected in the cam setup. All set to NTP server and with the NTP server showing the DST offset.

I believe that the deal here is that NTP always uses UTC. NetTime pulls UTC from whatever server it references. It adjusts it's own shown time based on whatever local settings are active on the machine where it's running (e.g., the Time shown in the NetTime box). But as an NTP server, it only passes UTC to the cams or other devices accessing it, not the adjusted time shown where it's running. It's up to the local device to do whatever as far as any offsets from UTC. If that makes sense...
 
Last edited:

saltwater

Getting comfortable
Joined
Oct 6, 2019
Messages
488
Reaction score
633
Location
Melbourne, Australia
Ok, I concede. I changed my time zone to your (@Mike A.) time zone as per your screen shots above. Yes, I got the same results toggling the DST in the camera settings. Thanks everyone for your patience, I know it wasn't easy.
 

Teken

Known around here
Joined
Aug 11, 2020
Messages
1,588
Reaction score
2,875
Location
Canada
I noticed some of the members posted their internal video settings have the camera NTP service set to update every 10 ~ 30 minutes?!?! :thumbdown:

Are the Duahua security camera's still having large time drift issues or is this just a personal choice to do so??? :lmao:
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,145
Reaction score
49,018
Location
USA
Well some of them can only max out to 30min limits LOL.
 

Teken

Known around here
Joined
Aug 11, 2020
Messages
1,588
Reaction score
2,875
Location
Canada
Well some of them can only max out to 30min limits LOL.
So let me be more specific do you see a large time drift from the camera if you turn off the NTP Service??
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,145
Reaction score
49,018
Location
USA
So let me be more specific do you see a large time drift from the camera if you turn off the NTP Service??
I haven't tried LOL. Let me turn one off and see. What were hearing on large drift - like 10ms over a week period or 2 minutes over a 3 day period LOL. Just wanna know some perspective on what to look for LOL.
 

Teken

Known around here
Joined
Aug 11, 2020
Messages
1,588
Reaction score
2,875
Location
Canada
I haven't tried LOL. Let me turn one off and see. What were hearing on large drift - like 10ms over a week period or 2 minutes over a 3 day period LOL. Just wanna know some perspective on what to look for LOL.
Honestly, I believe it really depends upon each vendor hardware in use. Generally speaking when people talk about time drift its minutes over a year etc. In terms of day, week, month, the mean average is 1-2 seconds depending upon the tolerance of the hardware in use.

Those that incorporate a temperature compensated RTC within normally only lose a few ms over the same period of time. Regardless, I would be very surprised to learn a camera would lose minutes over a period of a single day.
 

Mike A.

Known around here
Joined
May 6, 2017
Messages
3,837
Reaction score
6,412
I don't think that most do. I know that I've messed up settings and had them run for a long time from an initial setting. An Hikvision cam that I looked at the other day and noticed was off had been running for probably 6 months with a bad NTP address. It was off by about 1/2 hour.

I have mine set to 10 minutes on the cam for no particular reason. Doesn't need to be that frequent. I think that my time server only updates from source 2X/day. But the traffic and load to do NTP is so trivially small that it doesn't matter much if frequent.
 

Teken

Known around here
Joined
Aug 11, 2020
Messages
1,588
Reaction score
2,875
Location
Canada
I don't think that most do. I know that I've messed up settings and had them run for a long time from an initial setting. An Hikvision cam that I looked at the other day and noticed was off had been running for probably 6 months with a bad NTP address. It was off by about 1/2 hour.

I have mine set to 10 minutes on the cam for no particular reason. Doesn't need to be that frequent. I think that my time server only updates from source 2X/day. But the traffic and load to do NTP is so trivially small that it doesn't matter much if frequent.
Thirty minutes over a course of six months?? :embarrassed:
 
Top