MDL-31193 display the correct and translated token valid until date
authorJerome Mouneyrac <jerome@mouneyrac.com>
Fri, 3 May 2013 06:09:34 +0000 (14:09 +0800)
committerJerome Mouneyrac <jerome@mouneyrac.com>
Fri, 3 May 2013 06:17:15 +0000 (14:17 +0800)
lib/adminlib.php
webservice/renderer.php

index 18f06e7..fa7adbe 100644 (file)
@@ -7544,7 +7544,7 @@ class admin_setting_managewebservicetokens extends admin_setting {
 
                 $validuntil = '';
                 if (!empty($token->validuntil)) {
-                    $validuntil = date("F j, Y"); //TODO: language support (look for moodle function)
+                    $validuntil = userdate($token->validuntil, get_string('strftimedatetime', 'langconfig'));
                 }
 
                 $iprestriction = '';
index 52f0e5f..f78309d 100644 (file)
@@ -332,7 +332,7 @@ class core_webservice_renderer extends plugin_renderer_base {
 
                 $validuntil = '';
                 if (!empty($token->validuntil)) {
-                    $validuntil = date("F j, Y"); //TODO MDL-31193 language support (look for moodle function)
+                    $validuntil = userdate($token->validuntil, get_string('strftimedatetime', 'langconfig'));
                 }
 
                 $tokenname = $token->name;