diff --git a/packages/core/server/src/middlewares/parse-variables.ts b/packages/core/server/src/middlewares/parse-variables.ts index 6e4cd323b..9dc8a1839 100644 --- a/packages/core/server/src/middlewares/parse-variables.ts +++ b/packages/core/server/src/middlewares/parse-variables.ts @@ -44,9 +44,6 @@ export const parseVariables = async (ctx, next) => { return ctx.db.getFieldByPath(`${resourceName}.${fieldPath}`); }, vars: { - $system: { - now: new Date().toISOString(), - }, $date: getDateVars(), $user: getUser(ctx), }, diff --git a/packages/core/utils/src/parse-filter.ts b/packages/core/utils/src/parse-filter.ts index ec1849806..c5535012e 100644 --- a/packages/core/utils/src/parse-filter.ts +++ b/packages/core/utils/src/parse-filter.ts @@ -267,6 +267,7 @@ const toDays = (offset: number) => { export function getDateVars() { return { + now: new Date().toISOString(), today: toUnit('day'), yesterday: toUnit('day', -1), tomorrow: toUnit('day', 1),