Closed dzek69 closed 3 years ago
Thanks @dzek69 - Should we not be then converting this date to UTC before setting it?
Can you print the XML that the camera is returning?
Could be different for different cameras but mine's doesn't define timezone, so I cannot really convert it in any way.
The XML:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope ><SOAP-ENV:Body><tds:GetSystemDateAndTimeResponse><tds:SystemDateAndTime><tt:DateTimeType>NTP</tt:DateTimeType><tt:DaylightSavings>false</tt:DaylightSavings><tt:LocalDateTime><tt:Time><tt:Hour>0</tt:Hour><tt:Minute>0</tt:Minute><tt:Second>50</tt:Second></tt:Time><tt:Date><tt:Year>1979</tt:Year><tt:Month>11</tt:Month><tt:Day>30</tt:Day></tt:Date></tt:LocalDateTime></tds:SystemDateAndTime></tds:GetSystemDateAndTimeResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
This camera is insecure so I'm not allowing it access to the internet, so the date is wrong.
Hi I've just borrowed a cheap no-name camera and have the same thing.
Just looking at the Pull Request now.
This should really have a test around it but the changes to the code don't affect the current functionality, so merging in.
Fixes #160, tested on real device that has this issue