Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
I am running sql query fetching month and year of a created_at field in a table and i get wrong month and year result
MariaDB [fit_fix_analytics]> select CONVERT_TZ(created_at, '+00:00', '+03:00') as date, YEAR(CONVERT_TZ(created_at, '+00:00', '+03:00')) as year, MONTH(CONVERT_TZ(created_at, '+00:00', '+03:00')) as month from table limit 10;
------------------------------
| date | year | month |
------------------------------
| 2020-09-11 00:36:58 | 0 | 1 |
| 2020-09-11 01:03:49 | 0 | 1 |
| 2020-09-11 01:30:08 | 0 | 1 |
| 2020-09-11 01:41:44 | 0 | 1 |
| 2020-09-11 21:14:55 | 0 | 1 |
| 2020-09-11 21:15:54 | 0 | 1 |
| 2020-09-11 21:18:36 | 0 | 1 |
| 2020-09-11 21:21:15 | 0 | 1 |
| 2020-09-12 22:10:58 | 0 | 1 |
| 2020-09-13 11:57:37 | 0 | 1 |
------------------------------