Github user wgtmac commented on a diff in the pull request:
https://github.com/apache/orc/pull/249#discussion_r185690848
--- Diff:
java/core/src/java/org/apache/orc/impl/writer/TimestampTreeWriter.java ---
@@ -54,9 +57,20 @@ public TimestampTreeWriter(int columnId,
if (rowIndexPosition != null) {
recordPosition(rowIndexPosition);
}
- this.localTimezone = TimeZone.getDefault();
- // for unit tests to set different time zones
- this.baseEpochSecsLocalTz =
Timestamp.valueOf(BASE_TIMESTAMP_STRING).getTime() / MILLIS_PER_SECOND;
+ if (writer.isUseUTCTimestamp()) {
+ this.localTimezone = TimeZone.getTimeZone("UTC");
--- End diff --
We'd better change its name to this.writeTimezone to avoid confusion in the
future.
Same for localDateFormat and baseEpochSecsLocalTz below.
---