rdblue commented on code in PR #4871:
URL: https://github.com/apache/iceberg/pull/4871#discussion_r909042607


##########
core/src/main/java/org/apache/iceberg/util/DateTimeUtil.java:
##########
@@ -88,4 +88,38 @@ public static long microsFromTimestamptz(OffsetDateTime 
dateTime) {
   public static String formatTimestampMillis(long millis) {
     return 
DATE_FORMAT.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(millis), 
ZoneOffset.UTC));
   }
+
+  public static String daysToIsoDate(int days) {
+    return dateFromDays(days).format(DateTimeFormatter.ISO_LOCAL_DATE);
+  }
+
+  public static String microsToIsoTime(long micros) {
+    return timeFromMicros(micros).format(DateTimeFormatter.ISO_LOCAL_TIME);
+  }
+
+  public static String microsToIsoDateTimeTz(long micros) {
+    LocalDateTime localDateTime = timestampFromMicros(micros);
+    return OffsetDateTime.of(localDateTime, 
ZoneOffset.UTC).format(DateTimeFormatter.ISO_OFFSET_DATE_TIME);

Review Comment:
   Minor: other places use `localDateTime.atOffset(ZoneOffset.UTC)` instead. 
Can you use that for consistency?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to