jcamachor commented on a change in pull request #1392:
URL: https://github.com/apache/hive/pull/1392#discussion_r468864544
##########
File path:
common/src/java/org/apache/hadoop/hive/common/type/TimestampTZUtil.java
##########
@@ -145,13 +149,33 @@ public static ZoneId parseTimeZone(String timeZoneStr) {
}
}
+ public static Timestamp convertTimestampToZone(Timestamp ts, ZoneId
fromZone, ZoneId toZone) {
+ return convertTimestampToZone(ts, fromZone, toZone, false);
+ }
+
/**
* Timestamps are technically time zone agnostic, and this method sort of
cheats its logic.
* Timestamps are supposed to represent nanos since [UTC epoch]. Here,
* the input timestamp represents nanoseconds since [epoch at fromZone], and
* we return a Timestamp representing nanoseconds since [epoch at toZone].
*/
- public static Timestamp convertTimestampToZone(Timestamp ts, ZoneId
fromZone, ZoneId toZone) {
+ public static Timestamp convertTimestampToZone(Timestamp ts, ZoneId
fromZone, ZoneId toZone,
+ boolean legacyConversion) {
+ if (legacyConversion) {
+ try {
+ DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Review comment:
Yes, that's right. I'll change it in follow-up commit.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]