I need to create a query with my local time (+07:00). The server time is in GMT and all times stored in DB are in GMT too.
For example, today is June 18 I want to find records whose created_at (type: Date
) is yesterday in my local time, which means the start date should be 2019-06-16 17:00:00.000 and the end date should be 2019-06-17 16:59:59.999. Is it possible to pass the timezone?
Asked
Active
Viewed 6,910 times
0

CherryBelle
- 1,302
- 7
- 26
- 46
-
You can refer https://stackoverflow.com/questions/31725820/how-to-use-the-mysql-convert-tz-function-in-a-jpql-or-hql-query/31741171 – Snehal Patel Jun 18 '19 at 03:52