Skip to content

Commit

Permalink
make zoneid default
Browse files Browse the repository at this point in the history
  • Loading branch information
EMsnap committed Dec 15, 2023
1 parent 0841e18 commit a22f7af
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class RoundTimestampFunction extends ScalarFunction {
private static final long serialVersionUID = 1L;

public static final Logger LOG = LoggerFactory.getLogger(RoundTimestampFunction.class);

public static final ZoneId DEFAULT_ZONE = ZoneId.systemDefault();
private transient DateTimeFormatter formatter;

/**
Expand All @@ -51,7 +51,7 @@ public String eval(Long timestamp, Long roundTime, String format) {
try {
LocalDateTime dateTime = LocalDateTime.ofInstant(
Instant.ofEpochSecond(timestamp - timestamp % roundTime),
ZoneId.systemDefault());
DEFAULT_ZONE);
if (formatter == null) {
formatter = DateTimeFormatter.ofPattern(format);
}
Expand Down

0 comments on commit a22f7af

Please sign in to comment.