Skip to content

Commit

Permalink
Date: Fix generation of invalid timestamps for time zones ahead of UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
mwild1 committed Jul 2, 2024
1 parent 7b1088e commit 5500f87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snikket/Date.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Date {
var tzMinute = Std.int(Math.abs(d.getTimezoneOffset())%60);
return
str + (tzHour < 0 ? "+" : "-") +
StringTools.lpad(Std.string(tzHour), "0", 2) + ":" +
StringTools.lpad(Std.string(Math.abs(tzHour)), "0", 2) + ":" +
StringTools.lpad(Std.string(tzMinute), "0", 2);
}
}

0 comments on commit 5500f87

Please sign in to comment.