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 'EndDateTime':
case 'StartDateTime': case 'StartDateTime':
if ( $value_upper != 'NULL' ) if ( $value_upper != 'NULL' )
$value = "'".strftime(STRF_FMT_DATETIME_DB, strtotime($value))."'"; $value = "'".date(STRF_FMT_DATETIME_DB, strtotime($value))."'";
break; break;
case 'Date': case 'Date':
case 'EndDate': case 'EndDate':
case 'StartDate': case 'StartDate':
$value = 'to_days(\''.strftime(STRF_FMT_DATETIME_DB, strtotime($value)).'\')'; $value = 'to_days(\''.date(STRF_FMT_DATETIME_DB, strtotime($value)).'\')';
break; break;
case 'Time': case 'Time':
case 'EndTime': case 'EndTime':
case 'StartTime': 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; break;
default : default :
if ( $value_upper != 'NULL' ) if ( $value_upper != 'NULL' )