摘要: 时间戳转日期、日期时间1.不带时区的时间格式。我开发中经常用的 select to_char(to_timestamp(1628088734), 'yyyy-mm-dd hh24:mi:ss') 如果想带毫秒:格式化为:'yyyy-mm-dd hh24:mi:ss.us——————————————— 阅读全文
posted @ 2022-08-01 18:01 疯子110 阅读(5305) 评论(0) 推荐(0) 编辑
摘要: 1 SELECT to_timestamp('2020-02-27 12:12:12','yyyy-MM-dd hh24:mi:ss') ; 2 SELECT to_date('2020-02-27 12:12:12','yyyy-MM-dd hh24:mi:ss') ; to_timestamp返 阅读全文
posted @ 2022-08-01 18:00 疯子110 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 因为经常要使用ZonedDateTime,涉及到与字符串的相互转换一、ZonedDateTime转为字符串 ZonedDateTime now = ZonedDateTime.now();DateTimeFormatter formatter = DateTimeFormatter.ofPatter 阅读全文
posted @ 2022-08-01 17:59 疯子110 阅读(981) 评论(0) 推荐(0) 编辑
摘要: 问题想控制整个系统的时区为东八区 解决import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication; import java. 阅读全文
posted @ 2022-08-01 17:26 疯子110 阅读(891) 评论(0) 推荐(0) 编辑