fix timezone - time with local timezone to default timezone

This commit is contained in:
pyaephyoeaung
2022-05-19 14:20:55 +06:30
parent 7598a96e60
commit 214712fd2d
48 changed files with 294 additions and 305 deletions

View File

@@ -8,7 +8,7 @@ class Survey < ApplicationRecord
end
if from.present? && to.present?
survey = Survey.where("DATE_FORMAT(created_at,'%d-%m-%Y') >= ?" + " AND DATE_FORMAT(created_at,'%d-%m-%Y') <= ?", from,to)
survey = Survey.where("created_at BETWEEN ? AND ?", from, to)
query = survey.where(keyword)
else
where("dining_name LIKE ?", "%#{filter}%")