Hi Michael, On 26 Feb 2020, at 04:29, Michael Kondratov via Webobjects-dev <webobjects-dev@lists.apple.com> wrote:
> Whats the winning strategy on dealing with users / records in multiple > timezones? We are starting add add companies that are few hours away from us > and don't know how to best handle it. Our approach is something like this: 1. Confirm that you actually need to handle timezones. Sometimes you do, and sometimes you're stuck with legacy design decisions, but if you don't, then types like java.time.LocalDate, java.time.LocalDateTime and friends have been fully supported in ERPrototypes.framework for a while now. 2. Ensure that you know the relevant local timezone for the user. This might be as simple as dropping an ERXTimeZoneDetector in your page wrapper component, which will pull the time zone from the user's browser and store it in the Session. Or maybe you need an organisation-wide timezone selected for groups of users. This step will be application dependent. 3. Once you've got 2, use that to convert times from local into UTC on the way into the database, and from UTC to local on the way back out. The local timezones on either side of that process might not be the same—they will vary with your solution to 2 above—but you'll always be talking about the same instant in time, stored in the database as UTC. -- Paul Hoadley https://logicsquad.net/ https://www.linkedin.com/company/logic-squad/
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com