Mysql timestamp to datetime string / datetime string to timestamp (with timezone)

mysql timestamp to datetime string / datetime string to timestamp (with timezone)

database timezone is UTC (+0), need get Asia/Taipei (+8)

CONVERT_TZ(datetime string, from_timezone, to_timezone)

timestamp to datetime string

CONVERT_TZ(FROM_UNIXTIME(`my_timestamp`), '+00:00', '+08:00') my_datetime,

datetime string to timestamp

UNIX_TIMESTAMP(CONVERT_TZ("2023-01-01", '+08:00', '+00:00'))