Browse Source

fix tz_offset_to_seconds

pull/10/head
Aaron Parecki 9 years ago
parent
commit
36631eb7fb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lib/helpers.php

+ 1
- 1
lib/helpers.php View File

@ -231,7 +231,7 @@ function tz_seconds_to_offset($seconds) {
function tz_offset_to_seconds($offset) { function tz_offset_to_seconds($offset) {
if(preg_match('/([+-])(\d{2}):?(\d{2})/', $offset, $match)) { if(preg_match('/([+-])(\d{2}):?(\d{2})/', $offset, $match)) {
$sign = ($match[1] == '-' ? -1 : 1); $sign = ($match[1] == '-' ? -1 : 1);
return ($match[2] * 60 * 60) + ($match[3] * 60) * $sign;
return (($match[2] * 60 * 60) + ($match[3] * 60)) * $sign;
} else { } else {
return 0; return 0;
} }

Loading…
Cancel
Save