diff --git a/src/main/java/com/hubspot/jinjava/lib/fn/Functions.java b/src/main/java/com/hubspot/jinjava/lib/fn/Functions.java index 396a0f9be..259eb0e9f 100644 --- a/src/main/java/com/hubspot/jinjava/lib/fn/Functions.java +++ b/src/main/java/com/hubspot/jinjava/lib/fn/Functions.java @@ -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) {