From a4942630c40025cb74fc55ca2cc9daead1f598f7 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 11 Sep 2013 14:59:07 +1000 Subject: [PATCH] Select the match for timezone with the most digits --- functions/functions.import.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/functions.import.php b/functions/functions.import.php index 817c8efd..92fe97cb 100644 --- a/functions/functions.import.php +++ b/functions/functions.import.php @@ -356,7 +356,8 @@ function get_time_zone($value,$type) $sql = "SELECT Time_zone_name as tz FROM `$tname` - WHERE val = SUBSTR($value, 1, CHAR_LENGTH( val ) )"; + WHERE val = SUBSTR($value, 1, CHAR_LENGTH( val ) ) + ORDER BY CHAR_LENGTH(val) DESC"; $tz = $db->GetOne($sql);