diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-05-03 20:09:24 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-05-03 20:09:24 +0200 |
commit | 12ff86c961b49727fcae97938e864766aa77a2a9 (patch) | |
tree | d66dd252d0a1d5f935fe4784be896ce22434b775 /index.php | |
parent | 9ad2950debf1d9e4528700854cf7c02daac9636d (diff) | |
download | Shaarli-12ff86c961b49727fcae97938e864766aa77a2a9.tar.gz Shaarli-12ff86c961b49727fcae97938e864766aa77a2a9.tar.zst Shaarli-12ff86c961b49727fcae97938e864766aa77a2a9.zip |
Use correct 'UTC' timezone
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -1276,11 +1276,15 @@ function renderPage() | |||
1276 | { | 1276 | { |
1277 | if (!empty($_POST['title']) ) | 1277 | if (!empty($_POST['title']) ) |
1278 | { | 1278 | { |
1279 | if (!tokenOk($_POST['token'])) die('Wrong token.'); // Go away! | 1279 | if (!tokenOk($_POST['token'])) { |
1280 | die('Wrong token.'); // Go away! | ||
1281 | } | ||
1280 | $tz = 'UTC'; | 1282 | $tz = 'UTC'; |
1281 | if (!empty($_POST['continent']) && !empty($_POST['city'])) | 1283 | if (!empty($_POST['continent']) && !empty($_POST['city']) |
1282 | if (isTimeZoneValid($_POST['continent'],$_POST['city'])) | 1284 | && isTimeZoneValid($_POST['continent'], $_POST['city']) |
1283 | $tz = $_POST['continent'].'/'.$_POST['city']; | 1285 | ) { |
1286 | $tz = $_POST['continent'] . '/' . $_POST['city']; | ||
1287 | } | ||
1284 | $GLOBALS['timezone'] = $tz; | 1288 | $GLOBALS['timezone'] = $tz; |
1285 | $GLOBALS['title']=$_POST['title']; | 1289 | $GLOBALS['title']=$_POST['title']; |
1286 | $GLOBALS['titleLink']=$_POST['titleLink']; | 1290 | $GLOBALS['titleLink']=$_POST['titleLink']; |
@@ -2113,10 +2117,10 @@ function install() | |||
2113 | if (!empty($_POST['setlogin']) && !empty($_POST['setpassword'])) | 2117 | if (!empty($_POST['setlogin']) && !empty($_POST['setpassword'])) |
2114 | { | 2118 | { |
2115 | $tz = 'UTC'; | 2119 | $tz = 'UTC'; |
2116 | if (!empty($_POST['continent']) && !empty($_POST['city'])) { | 2120 | if (!empty($_POST['continent']) && !empty($_POST['city']) |
2117 | if (isTimeZoneValid($_POST['continent'], $_POST['city'])) { | 2121 | && isTimeZoneValid($_POST['continent'], $_POST['city']) |
2118 | $tz = $_POST['continent'].'/'.$_POST['city']; | 2122 | ) { |
2119 | } | 2123 | $tz = $_POST['continent'].'/'.$_POST['city']; |
2120 | } | 2124 | } |
2121 | $GLOBALS['timezone'] = $tz; | 2125 | $GLOBALS['timezone'] = $tz; |
2122 | // Everything is ok, let's create config file. | 2126 | // Everything is ok, let's create config file. |