Date being adjusted to timezone from mysql datasource

I have seen others complain about this with no good solution (re-structuring my database is not an option.)

So, heres how I get date to show correctly in a table, simply convert timezone to utc on the go

your select command needs to be something like

SELECT
  column1,
  column2,
  CONVERT_TZ(`column_name_with_date`, '-05:00', '+00:00') AS `date`
FROM 
  `db`.`table`;

just change -05:00 to match your time offset

Hope this helps :smiley:

3 Likes