Message-ID: From: "tordmjohnson (@tordmjohnson)" To: "pgjdbc/pgjdbc" Date: Fri, 20 Oct 2017 13:49:13 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #943: fix: synchronize modification of shared calendar (#921) In-Reply-To: References: List-Id: X-GitHub-Author-Login: tordmjohnson X-GitHub-Comment-Id: 338212010 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 943 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/943#issuecomment-338212010 Content-Type: text/plain; charset=utf-8 > Would you please treat PgResultSet#getDefaultCalendar and PgPreparedStatement#getDefaultCalendar? I'd be happy to, @vlsi, but I'm not sure I understand exactly what you're asking for. Are you simply asking that `PgResultSet#getDefaultCalendar()` and `PgPreparedStatement#getDefaultCalendar()` synchronize over the monitor for modifying `TimestampUtils#calendarWithUserTz` (the `TimestampUtils` instance itself), since they may indirectly set the time zone on the shared calendar? That is, something like: ``` private Calendar getDefaultCalendar() { TimestampUtils timestampUtils = connection.getTimestampUtils(); synchronized (timestampUtils) { ... } ... } ```