From f556cde38584325d4925d360369a063659863e8a Mon Sep 17 00:00:00 2001 From: thomasmars Date: Wed, 22 Feb 2017 16:20:09 +0100 Subject: [PATCH] Added localized time interface for displaying correct time of content type cache update. JI-53 --- h5p.classes.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/h5p.classes.php b/h5p.classes.php index 05f093f..d6ced22 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -586,6 +586,13 @@ interface H5PFrameworkInterface { * containing the new content type cache that should replace the old one. */ public function replaceContentTypeCache($contentTypeCache); + + /** + * Get timestamp of time at user + * + * @return int Timestamp of localized time + */ + public function getCurrentUserTime(); } /** @@ -2808,7 +2815,7 @@ class H5PCore { // Inform of the changes and update timestamp $interface->setInfoMessage($interface->t('Library cache was successfully updated!')); - $interface->setOption('content_type_cache_updated_at', time()); + $interface->setOption('content_type_cache_updated_at', $interface->getCurrentUserTime()); return TRUE; } }