Skip to content

Commit

Permalink
Fix date-time format with configured timezone.
Browse files Browse the repository at this point in the history
  • Loading branch information
hs-lsong committed May 30, 2024
1 parent c3eb356 commit e128797
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/hubspot/jinjava/lib/fn/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ public static String dateTimeFormat(Object var, String... format) {
zoneOffset = ((ZonedDateTime) var).getZone();
} else if (var instanceof PyishDate) {
zoneOffset = ((PyishDate) var).toDateTime().getZone();
} else if (interpreter != null) {
zoneOffset = interpreter.getConfig().getTimeZone();
}

if (var == null) {
Expand Down

0 comments on commit e128797

Please sign in to comment.