We use your protocol (method ‘GOTO’) and this method returns the frame without taking into account timezone (returns time in UTC). Is there any way to get frame with taking into account timezone or any way (method) to get the current timezone on the video server?
There is no functionality that the server can return the local timezone.
You will have to know where the server is and trust that the setup is correctly using the local timezone.
As Rie mentioned, I don’t think there is a possibility to get the timezone information of the Recording Server or specify a timezone with the GOTO request. In case it’s helpful, here’s some background information on timestamps in our software in general.
All times are stored in UTC format and the original timezone is typically discarded and while I can imagine some situations where it would be useful, apparently it’s not often required for most purposes as I haven’t seen many requests for it.
If it were to be provided, there would still be some accuracy issues since cameras aren’t necessarily always in the same timezone as the Recording Server, and cameras are very often not configured with an accurate timestamp or timezone, so the images are always stored based on the Recording Server time, converted to UTC.
Looking at the Configuration API and the strong-typed RecordingServer object in the MIP SDK, there is a TimeZoneName property available on the Recording Server objects, so technically you may be able to determine the timezone of the Recording Server, and make your request based on that. In most cases I imagine it would accurately allow you to make a request for “Video from 8am local time” with the rare failure due to the camera being physically located in a different timezone than the Recording Server.
Unfortunately, it looks like it’s the Time Zone Name and not the locale name. For example, my locale is always “America/Los_Angeles” but my current timezone is Pacific Daylight Time. Later this year it’ll switch to Pacific Standard Time according to the rules of the America/Los_Angeles locale. Currently my Recording Server shows it’s timezone as Pacific Standard Time, so I’m not sure if this value is ever changed from when the Recording Server first registered with the Management Server.
Long story short, you can sort of get the information you want, but not in a reliably accurate way. And also, DateTime hurts my brain.