-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't convert timezone naive dates to timezone aware #15
Comments
Thanks for flagging this issue! Timezone behaviour hasn't been something I've given a lot of thought towards. You're right that the RETS doc doesn't seem to explicitly specify what the timezone of returned dates ought to be, however it does make a mention of timezones for dates in the search query. (e.g. see https://github.com/troydavisson/PHRETS/wiki/Timezone-Handling). The part that stands out to me is (in section 7.7.2):
This seems to suggest that if the Separately, this brings up another issue that if the MLS does advertise a |
That tends to be the case with timezone stuff. It's very out of sight out of mind, until it bites and you have to deal with it. :P My general thinking with this would be:
RETS doesn't give much help here. The snippet you mention above is somewhat ambiguous:
I'm not sure it it's just talking about queries, as it is in the sentences before it, or the data returned as well. In the RETS implementation I'm currently working with there is not offset specified and the dates are tz naive. However, they're being serialized by the library as UTC which causes some quiet bugs. |
Contingent on the RETS server supporting date queries using alternate timezones (e.g. 2017-11-23T16:50:00-05:00), if you retrieve a listing by querying for it via its modification timestamp with a specific timezone, then run a second query for the same date/time but altering it by an hour and changing the timezone to compensate, you can compare a date field between the two listings to determine the timezone being used by date values returned by the server, and whether the timezone in the query affects the returned values timezone. E.g. |
I noticed this behavior while dealing with an MLS that appears to be using EST for it's time.
However there is no system
TimeZoneOffset
and the actual dates are coming through as timezone naive ISO strings -2017-07-14T16:47:57.210
.The
rets
package appears to be adding UTC timezone to the timezone naive strings. To me, this looks like an issue with their implementation, as they should really utilizeTimeZoneOffset
. Nonetheless, I don't see anything in the RETS docs about treating dates without timezone as UTC.What are you thoughts on this?
The text was updated successfully, but these errors were encountered: