From 32894d8917f4cbfd10f9deef2b31cf3506a2971b Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Mon, 22 Jan 2018 14:03:39 -0500 Subject: [PATCH] fix for fractional timezone offsets --- views/new-post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/new-post.php b/views/new-post.php index bdccb99..9b052c0 100644 --- a/views/new-post.php +++ b/views/new-post.php @@ -105,7 +105,7 @@ $(function(){ function tz_seconds_to_offset(seconds) { var tz_offset = ''; - var hours = zero_pad(Math.abs(seconds / 60 / 60)); + var hours = zero_pad(Math.floor(Math.abs(seconds / 60 / 60))); var minutes = zero_pad(Math.floor(seconds / 60) % 60); return (seconds < 0 ? '-' : '+') + hours + ":" + minutes; }