danny0405 commented on code in PR #13453:
URL: https://github.com/apache/hudi/pull/13453#discussion_r2153456537


##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieInstantTimeGenerator.java:
##########
@@ -152,6 +152,15 @@ public static String formatDate(Date timestamp) {
     return 
getInstantFromTemporalAccessor(convertDateToTemporalAccessor(timestamp));
   }
 
+  public static String formatDateBasedOnTimeZone(Date timestamp) {
+    if (HoodieTimelineTimeZone.UTC.equals(commitTimeZone)) {
+      return 
timestamp.toInstant().atZone(HoodieTimelineTimeZone.UTC.getZoneId())
+          .toLocalDateTime().format(MILLIS_INSTANT_TIME_FORMATTER);
+    } else {
+      return 
MILLIS_INSTANT_TIME_FORMATTER.format(convertDateToTemporalAccessor(timestamp));

Review Comment:
   Let's revert it first and fire another ticket to address the timezone issue 
for `#createNewInstantTime`.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to