开发者

To convert current time to utc format in samsung galaxy 5

开发者 https://www.devze.com 2023-03-22 10:01 出处:网络
I want to convert my current phone time to UTC format while posting a message.my code doesnt works insamsung galaxy 5.In samsung the current time is not converted.below is my开发者_如何学JAVA code

I want to convert my current phone time to UTC format while posting a message.my code doesnt works in samsung galaxy 5.In samsung the current time is not converted.below is my开发者_如何学JAVA code

SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
sdfDateTime.setTimeZone(TimeZone.getTimeZone("UTC"));
String newtime = sdfDateTime.format(new Date(System.currentTimeMillis()));
0

精彩评论

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

关注公众号