opensourceautomation / Open-Source-Automation

Open Source Automation is a home and commercial automation engine
www.opensourceautomation.com
GNU Lesser General Public License v3.0
97 stars 62 forks source link

REST not working on some clients' machines #351

Open VaughnRupp opened 7 years ago

VaughnRupp commented 7 years ago

Users say 043 worked and 048 is broken. All except the States call (I will update the exact call that is working as I work the issue.

Also, add some generic and simple calls for testing, then evolve that list of tests to more and more complicated. Maybe also right a routine that will run every call and report any broken calls.

KHerron commented 7 years ago

I have also noticed that the WebService.cs portion of the REST plugin is not logging any information.

KHerron commented 7 years ago

My bad, I did not have my debug set to TRUE

VaughnRupp commented 7 years ago

This has been narrowed down to foreign time zones.

KHerron commented 7 years ago

Found this on the MySQL help page:

MySQL converts TIMESTAMP values from the current time zone to UTC for storage, and back from UTC to the current time zone for retrieval. (This does not occur for other types such as DATETIME.) By default, the current time zone for each connection is the server's time. The time zone can be set on a per-connection basis. As long as the time zone setting remains constant, you get back the same value you store. If you store a TIMESTAMP value, and then change the time zone and retrieve the value, the retrieved value is different from the value you stored. This occurs because the same time zone was not used for conversion in both directions. The current time zone is available as the value of the time_zone system variable. For more information, see Section 11.6, “MySQL Server Time Zone Support”.

VaughnRupp commented 7 years ago

The issue is confirmed to be isolated to the REST plugin and date parsing. And it appears that it is tied to the Staring state of REST and changes to the time zone (changes to time zone After rest starts does not affect it.