From 3ce1cb95f7e3b44b5343c9a4caf25543cc4eaa86 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sun, 28 Apr 2013 16:34:04 +0200 Subject: [PATCH] Fixed future timestamps --- wcfsetup/install/files/js/WCF.js | 3 +++ .../template/plugin/TimeModifierTemplatePlugin.class.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 9ade67bd23..c9c64d58e3 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -2399,6 +2399,9 @@ WCF.Date.Time = Class.extend({ var $time = $element.data('time'); var $offset = $element.data('offset'); + // skip for future dates + if ($element.data('isFutureDate')) return; + // timestamp is less than 60 minutes ago (display 1 hour ago rather than 60 minutes ago) if ($timestamp >= this._timestamp || this._timestamp < ($timestamp + 3540)) { var $minutes = Math.max(Math.round((this._timestamp - $timestamp) / 60), 1); diff --git a/wcfsetup/install/files/lib/system/template/plugin/TimeModifierTemplatePlugin.class.php b/wcfsetup/install/files/lib/system/template/plugin/TimeModifierTemplatePlugin.class.php index 2f4de6f2aa..677d7c4ddf 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/TimeModifierTemplatePlugin.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/TimeModifierTemplatePlugin.class.php @@ -30,6 +30,6 @@ class TimeModifierTemplatePlugin implements IModifierTemplatePlugin { $time = DateUtil::format($dateTimeObject, DateUtil::TIME_FORMAT); $dateTime = str_replace('%time%', $time, str_replace('%date%', $date, WCF::getLanguage()->get('wcf.date.dateTimeFormat'))); - return ''; + return ''; } } -- 2.20.1