php - Mysql search tables find datetime fields and change timezone
I have tables in my legacy database that stored dates in CST format. Now I want to store them in UTC.
I want to create a script/query, in mysql, that would search my database for tables with
datetime fields and then convert the values there to UTC.
A script that would do this without having to write table names would be fun.
I have the query to convert time zone with
CONVERT_TZ, that is not a problem with me. But I want a script that searches through the database for tables and fields that has datetime as data type and then run the script on those fields.
Any idea how I can do that? Any reference would be nice, doesn't have to be code.