| I fail to see how a setting at session level (and what is SF level?) helps in this case. Also,
HHH-10399 Open only mentions: 1. The database default TZ – which we will want to ignore (plus is not used in TIMESTAMP WITHOUT TIME ZONE) 2. The stored TZ – which there is none in PostgreSQL, in either with or without time zone types 3. The JVM/JDBC TZ – which we will want to ignore, as the application has no control over it 4. The application TZ – which is deliberately set to a user-facing value, which has no relation to the time zone the values in a java.util.Date are to be stored in the database (which is always UTC) I guess being able to set a timezone of UTC for all java.util.Date mappings in all entities of a given WAR file would help (and even be more convenient), but other than that, and for some other use cases as well, this must be specifyable per-mapping. Oh, I can already see a use case: a WAR can include library JARs that have their own entities, whose behaviour must not change just because a setting for the application changed. If we can do something like this (the timezone would ideally be resolved only once, but @Timezone("UTC") or something would also work), I’d be happy already: {{ @Temporal(TIMESTAMP) @Timezone(UTC) @Column(name = "somename") private java.util.Date someName; }} |