Comments (3)
ISO8601. Always use this for storage and serialization of your time data.
Grab the timezone from the metadata (unfortunately, this isn't easy) or store it with your definition for an MLS. Take your DateTime and openhouse_time.change(offset: mls_offset)
to set the right time zone. Then use it like normal.
from rets.
Open house times are a pretty odd, most of the ones I've seen come as a string, something like 1pm-3pm
which is (usually) in the local time. How we parse this depends on the mls and what they give us, but we end up storing all of them as strings, similar to the sample above. We keep the raw data from the rets server around too, in case we need to reprocess those strings, but the strings can be used directly on the website, not requiring any processing.
I'm not sure this is the best solution, but it's pragmatic and works well for us. This has the downside that we can't search our database for open houses by time, but in practice we've never really needed that and for the majority of mlses we do minimal processing to format the string.
If you do need to search by open house times, normalizing the times and storing in two columns (or a range column if you're in postgresql!) as @timdorr suggests is probably best.
from rets.
Thanks for the info! Much appreciated
If, as you said, there is no need to search by time or show an open house time in a different timezone, then might as well save yourself the complexity and store as is.
@timdorr Unfortunately, you can't rely on an mls offset all the time because the mls may span multiple timezones and, as I recently noticed, the tz offset that an mls may advertise does not correct for DST.
from rets.
Related Issues (20)
- how to get valid object_types for RETS object ?
- retscli HOT 1
- More complete examples? HOT 3
- RESO Web API 1.x HOT 1
- Getting Agent/Office details using unique identifiers HOT 3
- Auth/Logout Failure HOT 1
- can I set the User Agent value when connecting to the MLS? HOT 1
- Handling Pagination HOT 2
- Update capability HOT 5
- CRMLS returning 401 when query result is empty HOT 6
- Create new release HOT 3
- Translating values using metadata on the fly? HOT 3
- Status 407 When Using a Proxy HOT 4
- Which version(s) of the RETS standard does this library work with? HOT 4
- Fetching images binary data from CRML HOT 13
- images issues HOT 1
- Error on login
- Key is not known in rets. HOT 2
- Get Lookup values HOT 1
- Retrieve photos in bulk
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rets.