1 Star 0 Fork 0

schwarizard / Chapter 13

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ZonedDateTimeDemo 590 Bytes
一键复制 编辑 原始数据 按行查看 历史
schwarizard 提交于 2016-04-18 00:20 +08:00 . new file
import kotlin.reflect.jvm.internal.impl.descriptors.EffectiveVisibility;
import static java.lang.System.out;
import java.time.*;
public class ZonedDateTimeDemo {
public static void main(String[] args) {
LocalTime localTime = LocalTime.of(0,0,0);
LocalDate localDate = LocalDate.of(1996,1,7);
ZonedDateTime zonedDateTime = ZonedDateTime.of(localDate,localTime,ZoneId.of("Asia/Taipei"));
out.println(zonedDateTime);
out.println(zonedDateTime.toEpochSecond());
out.println(zonedDateTime.toInstant().toEpochMilli());
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/schwarizard/Chapter-13.git
git@gitee.com:schwarizard/Chapter-13.git
schwarizard
Chapter-13
Chapter 13
master

搜索帮助