sr99622 / libonvif

Onvif library with GUI implementation and built in YOLOX
GNU Lesser General Public License v2.1
176 stars 45 forks source link

Time sync uses wrong timezone #98

Open madpipeline opened 1 month ago

madpipeline commented 1 month ago

Syncing the time on my cameras sets it to 3 hours in advance or my current time. My timezone is UTC+3.

I see no settings in the UI on how to configure the timezone.

madpipeline commented 1 month ago

Luckly, if I reboot my cameras they time sync automatically and the time is set back to what they should be.

sr99622 commented 1 month ago

Hello,

Thank you for your comments, the feedback is very much appreciated. This is unfortunate about the time zone. When working with cameras and onvif, it is often the case that the camera does not implement the spec, or may implement it incorrectly. During development it was learned that most cameras do not implement the onvif spec for time zone, so it was not vigorously pursued.

In most cases, the camera will accept the time setting as is without regard to time zone, so the time sync feature was made available. The downside of this is that for cameras that do implement time zone correctly, the time will be offset by the difference. Additionally, there was an oversight in the documentation that should have mentioned the lack of time zone settings and the possibility of an incorrect setting.

This is an issue that should be revisited, I will make some time for a more in depth look.

Best Regards,

Stephen

sr99622 commented 2 weeks ago

I updated the time sync function, which should help getting the cameras to show the correct time with time zone info.