summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorMacil Tech <maciltech@gmail.com>2013-03-10 21:09:48 +0800
committerMacil Tech <maciltech@gmail.com>2013-06-18 11:10:39 -0500
commit2fe79f6a610c987d342cf78bd6838e1db470a826 (patch)
tree990842dc61a56b836d776b0a80311bdee839f8cc /inc
parentfd33e9eba1e72fd4ee5f064944e9592be66c12c1 (diff)
Output times in UTC.
Let the client localize the times with js/local-time.js themselves. No one cares what the server timezone is. This fixes a bug where posts made in a different daylight savings mode have their times displayed off by an hour. Their times would be rendered to the server's own timezone area correctly, but then the server's *current* utc-offset would be appended, which wouldn't match up.
Diffstat (limited to 'inc')
-rw-r--r--inc/lib/Twig/Extensions/Extension/Tinyboard.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/inc/lib/Twig/Extensions/Extension/Tinyboard.php b/inc/lib/Twig/Extensions/Extension/Tinyboard.php
index 0a128e7b..67d63684 100644
--- a/inc/lib/Twig/Extensions/Extension/Tinyboard.php
+++ b/inc/lib/Twig/Extensions/Extension/Tinyboard.php
@@ -57,8 +57,7 @@ class Twig_Extensions_Extension_Tinyboard extends Twig_Extension
}
function twig_timezone_function() {
- // there's probably a much easier way of doing this
- return sprintf("%s%02d", ($hr = (int)floor(($tz = date('Z')) / 3600)) > 0 ? '+' : '-', abs($hr)) . ':' . sprintf("%02d", (($tz / 3600) - $hr) * 60);
+ return 'Z';
}
function twig_split_filter($str, $delim) {
@@ -75,7 +74,7 @@ function twig_remove_whitespace_filter($data) {
}
function twig_date_filter($date, $format) {
- return strftime($format, $date);
+ return gmstrftime($format, $date);
}
function twig_hasPermission_filter($mod, $permission, $board = null) {