开发者

Convert a user inputted time to UNIX Time? [Android]

How would I convert a user given time, using the time picker would be fine, into UNIX time assumin开发者_如何学运维g the user inputted a time in the same time zone that they are currently in?


You should use Calendar to convert values provided by the user to valid Unix timestamps

Calendar cal = Calendar.getInstance();
cal.set(2011, 9, 3);
cal.getTimeInMillis();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜