diff options
author | Ryan Egesdahl <ryan.egesdahl@mongodb.com> | 2020-06-18 21:21:25 -0700 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-06-26 17:02:46 +0000 |
commit | 22d98e72ac45cd4e145d6b9b42099c5585727ec7 (patch) | |
tree | 4b8f982350542694eb27ddee799c1b75af148729 /src/third_party/timelib-2018.03/zones/sort-index.php | |
parent | e976a66489bb0b600d9896bdada5e33e6d885534 (diff) | |
download | mongo-22d98e72ac45cd4e145d6b9b42099c5585727ec7.tar.gz |
SERVER-44278 Upgrade timelib to 2018.03
This is a third-party source upgrade of timelib to version 2018.03.
Diffstat (limited to 'src/third_party/timelib-2018.03/zones/sort-index.php')
-rw-r--r-- | src/third_party/timelib-2018.03/zones/sort-index.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/third_party/timelib-2018.03/zones/sort-index.php b/src/third_party/timelib-2018.03/zones/sort-index.php new file mode 100644 index 00000000000..3982b453484 --- /dev/null +++ b/src/third_party/timelib-2018.03/zones/sort-index.php @@ -0,0 +1,17 @@ +<?php + $idx = file("timezonedb.idx"); + usort($idx, 'sortfunc'); + echo implode($idx); + + function sortfunc($a, $b) + { + /* Grep tz names */ + preg_match('@"([^"]+)"@', $a, $ma); + $na = $ma[1]; + preg_match('@"([^"]+)"@', $b, $mb); + $nb = $mb[1]; + + $val = strcasecmp($na, $nb); + return $val; + } +?> |