我正在进行以下查询以查看记录:
select * from dbName.TableName
以获取记录。
现在,它显示了utc格式的createdAt' and
updatedAt'。那么,有没有一种方法可以让我在查询时以IST(印度标准时间(格式看到它?
您需要MySql的Select_convert_tz((函数。查看文档
根据评论进行编辑:查询应该像
一样选择转换后的时区
select select_convert_tz(column,'from_timezone','to_timezone') from table where condition
或基于时区进行查询
select * from table where select_convert_tz(column,'from_timezone','to_timezone')>'some value'