ODM2DataSharingPortal
ODM2DataSharingPortal copied to clipboard
Confirm that WOFpy timestamps are correct
We just discovered that WOFpy is returning UTC time stamps in place of the local time, and that transmitted dateTimeUTC
values are wrong, because they're mis-calculated.
Here's the sleuthing I did to figure this out.
When I run this Get Request, without naming a time, it should give me the most recent data value. https://monitormywatershed.org/wofpy/rest/1_1/GetValues?location=envirodiy:CWS-ThomasDairy1&variable=envirodiy:Meter_Teros11_Temp
From the response, I see:
<creationTime>2019-09-10T08:14:41.327820</creationTime>
This is my local standard time (CST).
The values return is:
<value methodCode="2" qualityControlLevelCode="1" censorCode="nc"
dateTime="2019-09-10T14:10:00"
dateTimeUTC="2019-09-10T22:10:00" timeOffset="-08:00">
16.0</value>
Meanwhile, here are all the times zones:
TimeZone | UTCoffset | DateTime | |
---|---|---|---|
UTC | 0 | 2019-09-10 14:24:34 | |
EDT | -4 | 2019-09-10 10:24:34 | |
EST | -5 | 2019-09-10 9:24:34 | |
CDT | -5 | 2019-09-10 9:24:34 | current time zone, Minneapolis, MN |
CST | -6 | 2019-09-10 8:24:34 | |
PDT | -7 | 2019-09-10 7:24:34 | Computers in Oregon |
PST | -8 | 2019-09-10 6:24:34 | IoT Stations in Oregon |
And when I go to https://monitormywatershed.org/sites/CWS-ThomasDairy1/ I see a value of 16.0 (degC) for METER_TEROS 11 Soil Moisture at Height = 0.1 meters below surface. This matches the most recent value from the Get Values request, which means the times are all aligned because temperature is changes sub-hourly.
So, what I get from that is the value return dateTime="2019-09-10T14:10:00"
is actually in UTC rather than local CST, and therefore the dateTimeUTC="2019-09-10T22:10:00"
is actually being incorrectly calculated, and does not equal UTC at all!
The correct response should be:
<value methodCode="2" qualityControlLevelCode="1" censorCode="nc"
dateTime="2019-09-10T08:10:00"
dateTimeUTC="2019-09-10T14:10:00" timeOffset="-08:00">
16.0</value>