【发布时间】:2012-11-09 10:50:36
【问题描述】:
我有两个问题:
1- 从 Android 设备获取 UTC 时间 2- 将其转换为 UNIX 时间格式(毫秒)
感谢任何可以提供帮助的反馈
【问题讨论】:
-
java 101 : System.currentTimeMillis()
标签: android datetime time formatting utc
我有两个问题:
1- 从 Android 设备获取 UTC 时间 2- 将其转换为 UNIX 时间格式(毫秒)
感谢任何可以提供帮助的反馈
【问题讨论】:
标签: android datetime time formatting utc
我相信这应该可行:
Date now = Calendar.getInstance().getTime(); // this gets you current time as a Date
long milis = now.getTime(); // this gets you current time in UNIX format
【讨论】: