对ZonedDateTime或LocalDateTime进行格式化,需要使用DateTimeFormatter类。 DateTimeFormatter可以通过格式化字符串和Locale对日期和时间进行定制输出。 更多具体内容请扫描关注公众号 相关文章: 2021-12-29 2021-11-28