convert from strftime() to date() when forming sql

pull/3494/head
Isaac Connor 2022-06-01 15:47:19 -04:00
parent 907cdcd952
commit eb5c1372c7
1 changed files with 3 additions and 3 deletions

View File

@ -588,17 +588,17 @@ class Filter extends ZM_Object {
case 'EndDateTime':
case 'StartDateTime':
if ( $value_upper != 'NULL' )
$value = "'".strftime(STRF_FMT_DATETIME_DB, strtotime($value))."'";
$value = "'".date(STRF_FMT_DATETIME_DB, strtotime($value))."'";
break;
case 'Date':
case 'EndDate':
case 'StartDate':
$value = 'to_days(\''.strftime(STRF_FMT_DATETIME_DB, strtotime($value)).'\')';
$value = 'to_days(\''.date(STRF_FMT_DATETIME_DB, strtotime($value)).'\')';
break;
case 'Time':
case 'EndTime':
case 'StartTime':
$value = 'extract(hour_second from \''.strftime(STRF_FMT_DATETIME_DB, strtotime($value)).'\')';
$value = 'extract(hour_second from \''.date(STRF_FMT_DATETIME_DB, strtotime($value)).'\')';
break;
default :
if ( $value_upper != 'NULL' )