【发布时间】:2021-05-04 14:23:45
【问题描述】:
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
f.setTimeZone(TimeZone.getTimeZone("UTC"));
System.out.println( f.format(new Date()));
这将是 UTC 时区,我需要在英国(欧洲/伦敦)时区设置。?
【问题讨论】:
-
对上一个问题的回答可能会有所帮助 - stackoverflow.com/a/2540295/15310387
标签: java spring-boot