Reputation: 21
How to use utc_timestamp in Symfony 4?
Getting below message while using utc_timestamp
[Semantical Error] line 0, col 199 near 'UTC_TIMESTAMP': Error: 'UTC_TIMESTAMP' is not defined.
Upvotes: 1
Views: 350
Reputation: 735
It seems there is wrong way to use it. UTC_TIMESTAMP use with parentheses. it should like:
$qb->andWhere("(pv.appointmentDate) >= UTC_TIMESTAMP()");
Upvotes: 1
Reputation: 735
I think you need to use utc_timestamp with doctrine. you can include library in doctrine.yaml file.
orm:
dql:
string_functions:
UTC_TIMESTAMP: DoctrineExtensions\Query\Mysql\UtcTimestamp
Check with above code. Might be helpful.
Upvotes: 1