fix: use UTC_TIMESTAMP() to get current utc date instead of NOW() in sql queries

This commit is contained in:
Yassine Doghri 2022-04-14 14:33:53 +00:00
commit 4e22a0d5e4
20 changed files with 40 additions and 40 deletions

View file

@ -76,7 +76,7 @@ class PostController extends Controller
*/
$postReplies = model('PostModel', false)
->where('in_reply_to_id', service('uuid') ->fromString($this->post->id) ->getBytes())
->where('`published_at` <= NOW()', null, false)
->where('`published_at` <= UTC_TIMESTAMP()', null, false)
->orderBy('published_at', 'ASC');
$pageNumber = (int) $this->request->getGet('page');