Skip to content

Commit 1a82e35

Browse files
authored
Fix timezone handling in rfc822_datetime function
1 parent d4b0975 commit 1a82e35

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libreblog/libreblog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1443,7 +1443,7 @@ const configTwig = function() {
14431443
});
14441444

14451445
globalThis.Twig.extendFunction('rfc822_datetime', (dt, tz) => {
1446-
const dateString = dt.replace(" ", "T") + tz;
1446+
const dateString = dt.replace(" ", "T") + (tz ? tz : "");
14471447

14481448
const dayStrings = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
14491449
const monthStrings = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];

0 commit comments

Comments
 (0)