I use convert_tz for many queries that I use daily. Yesterday, it began yielding incorrect values.
I seperated these lines from my query, and ran them separately.
SELECT
CURDATE() - interval 1 day as yesterday,
CURDATE() as today,
CONVERT_TZ(CURDATE(), @@session.time_zone, 'America/New_York') as Today_CTZ;
This will return 3 columns, and it should show yestderday's date, todays date, and todays date. This is what is returned instead.
yesterday | today | Today_CTZ |
---|---|---|
2023-01-11 | 2023-01-12 | 2023-01-11 19:00:00 |
It has returned yesterdays date, todays date, and yesterdays date.
This query was run on 1/12/23 at 9:20 AM
This is what it should produce
yesterday | today | Today_CTZ |
---|---|---|
2023-01-11 | 2023-01-12 | 2023-01-12 19:00:00 |
Why is it doing this?