summaryrefslogtreecommitdiff
path: root/adodb-time.inc.php
diff options
context:
space:
mode:
authorMark Newnham <mark@newnhams.com>2020-01-06 19:38:46 -0700
committerDamien Regad <dregad@mantisbt.org>2020-01-24 23:08:40 +0100
commit2da3bde9db9b09755d48059cd2f28452371daa86 (patch)
tree8fabc1876fcb03006f1e4da327d6892911ece5d1 /adodb-time.inc.php
parent787b1c2bc5efa02adca2a93c2c81f4162cde46e9 (diff)
downloadadodb-2da3bde9db9b09755d48059cd2f28452371daa86.tar.gz
adodb-2da3bde9db9b09755d48059cd2f28452371daa86.tar.bz2
adodb-2da3bde9db9b09755d48059cd2f28452371daa86.zip
Remove PHP5 check
Function checked for PHP5, and made a separate display string for versions < 5.
Diffstat (limited to 'adodb-time.inc.php')
-rw-r--r--adodb-time.inc.php20
1 files changed, 5 insertions, 15 deletions
diff --git a/adodb-time.inc.php b/adodb-time.inc.php
index 97d2829e..dfb4e39f 100644
--- a/adodb-time.inc.php
+++ b/adodb-time.inc.php
@@ -1032,20 +1032,12 @@ global $_month_table_normal,$_month_table_leaf, $_adodb_last_date_call_failed;
0 => $origd
);
}
-/*
- if ($isphp5)
- $dates .= sprintf('%s%04d',($gmt<=0)?'+':'-',abs($gmt)/36);
- else
- $dates .= sprintf('%s%04d',($gmt<0)?'+':'-',abs($gmt)/36);
- break;*/
-function adodb_tz_offset($gmt,$isphp5)
+
+function adodb_tz_offset($gmt,$ignored=true)
{
$zhrs = abs($gmt)/3600;
$hrs = floor($zhrs);
- if ($isphp5)
- return sprintf('%s%02d%02d',($gmt<=0)?'+':'-',floor($zhrs),($zhrs-$hrs)*60);
- else
- return sprintf('%s%02d%02d',($gmt<0)?'+':'-',floor($zhrs),($zhrs-$hrs)*60);
+ return sprintf('%s%02d%02d',($gmt<=0)?'+':'-',floor($zhrs),($zhrs-$hrs)*60);
}
@@ -1119,8 +1111,6 @@ function adodb_date($fmt,$d=false,$is_gmt=false)
$max = strlen($fmt);
$dates = '';
- $isphp5 = PHP_VERSION >= 5;
-
/*
at this point, we have the following integer vars to manipulate:
$year, $month, $day, $hour, $min, $secs
@@ -1152,7 +1142,7 @@ function adodb_date($fmt,$d=false,$is_gmt=false)
$gmt = adodb_get_gmt_diff($year,$month,$day);
- $dates .= ' '.adodb_tz_offset($gmt,$isphp5);
+ $dates .= ' '.adodb_tz_offset($gmt);
break;
case 'Y': $dates .= $year; break;
@@ -1190,7 +1180,7 @@ function adodb_date($fmt,$d=false,$is_gmt=false)
case 'O':
$gmt = ($is_gmt) ? 0 : adodb_get_gmt_diff($year,$month,$day);
- $dates .= adodb_tz_offset($gmt,$isphp5);
+ $dates .= adodb_tz_offset($gmt);
break;
case 'H':