Open thodson-usgs opened 5 years ago
Is it possible to only pull the date column from groundwater levels? I'm finding that some sites do not have a time associated with the measurement and it's throwing an error because it can't convert that to a datetime index.
To update the status of this issue:
At this time there is still no built-in functionality for getting queries back in whatever timezone you want, they do come back with UTC-localized timestamps.
I assume that the daily data is in local time zone. However, the label on the time has Z on it which can be confusing.
That's a bug alright. The REST API can accept time zones, so perhaps we could handle this better. https://waterservices.usgs.gov/rest/IV-Service.html Unsure what users will want as the default behavior in this case. I vote for UTC as default, otherwise there could be unexpected consequences. Having no default would leave the data in multiple time zones, which isn't ideal. Neither can we assume a default time zone based on the compute clock, because the user may be in a different time zone from their compute.
On the subject of UTC - Is it expected behavior that the returned datetime index is UTC +0 rather than local UTC? E.g., for a randomly selected GW site with IV service, here is the dataRetrieval result (UTC+0):
and here is the NWIS web interface 'view data' (UTC-6):
I think can programmatically convert to local UTC using the tz_cd with the site information but perhaps it is preferred to have dataRetrieval handle that conversion?
Correct, we decided to stick with USGS, unlike the web interface. The reason being what is "local time" when you're working analyzing data from multiple timezones?
All data is converted to UTC; however, some users might prefer to work in a local timezone.