Permalink
Browse files

MDL-36773 timezone inconsistency => some number support decimal other…

… don\'t - Original patch author: Nathan Mares
  • Loading branch information...
1 parent e4592b2 commit ab1623b87baf4b44dd68c48444379b82fb739c0f @mouneyrac mouneyrac committed Nov 30, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/moodlelib.php
View
@@ -1117,7 +1117,7 @@ function clean_param($param, $type) {
case PARAM_TIMEZONE: //can be int, float(with .5 or .0) or string seperated by '/' and can have '-_'
$param = fix_utf8($param);
- $timezonepattern = '/^(([+-]?(0?[0-9](\.[5|0])?|1[0-3]|1[0-2]\.5))|(99)|[[:alnum:]]+(\/?[[:alpha:]_-])+)$/';
+ $timezonepattern = '/^(([+-]?(0?[0-9](\.[5|0])?|1[0-3](\.0)?|1[0-2]\.5))|(99)|[[:alnum:]]+(\/?[[:alpha:]_-])+)$/';
if (preg_match($timezonepattern, $param)) {
return $param;
} else {

0 comments on commit ab1623b

Please sign in to comment.