Fixed date query for MySQL.
This commit is contained in:
@@ -28,7 +28,7 @@ export function getDateQuery(field, unit, timezone) {
|
|||||||
if (timezone) {
|
if (timezone) {
|
||||||
const tz = moment.tz(timezone).format('Z');
|
const tz = moment.tz(timezone).format('Z');
|
||||||
|
|
||||||
return `date_format(convert_tz(${field},'+00:00','${tz}', '${MYSQL_DATE_FORMATS[unit]}')`;
|
return `date_format(convert_tz(${field},'+00:00','${tz}'), '${MYSQL_DATE_FORMATS[unit]}')`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return `${field}`;
|
return `${field}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user