java - To convert current time to utc format in samsung galaxy 5 -


i want convert current phone time utc format while posting message.my code doesnt works in samsung galaxy 5.in samsung current time not converted.below code

simpledateformat sdfdatetime = new simpledateformat("yyyy-mm-dd hh:mm:ss"); sdfdatetime.settimezone(timezone.gettimezone("utc")); string newtime = sdfdatetime.format(new date(system.currenttimemillis())); 


Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -