How to use MySQL now() and CONVERT_TZ() functions in queries


when I try to use this functions,

I’m getting the following errors:

DateTime::__construct(): Failed to parse time string

Any Idea for use, diferents time zones in my server


How are you making the calls?

In my case I do like this on the client:

body: {
   id: 12,
   some_param: 'foo',
   table: 'my_table',
   updated_at: {
     expression: 'NOW()'

“ReMovil”: “1333016117”,
“ReDateTime”: “2016-06-02 05:02:07”,
“ReServerDateTime”: {
“expression”: “now()”
“ReVelocidad”: “0”}

Thanks kimpatro

works fine

1 Like