将Tue Feb 22173124 CST2022换为2022-02-22

将new Date()=Tue Feb 22 17:31:24 CST 2022 转换为 2022-02-22 05:29:23
将Tue Feb 22 17:31:24 CST 2022 转换为 2022-02-22 05:29:23

new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date())

  

posted @ 2022-03-01 11:52  Amy清风  阅读(393)  评论(0编辑  收藏  举报