使用GPS时,如何在android中将UTC时间转换为设备时间?

使用GPS时,如何在android中将UTC时间转换为设备时间?,android,gps,utc,Android,Gps,Utc,大家好,请大家告诉我如何将UTC时间转换为android设备的当前时间 实际上,当我们在手机上使用GPS服务时,我显示的是纬度、经度、高度和时间 这里的时间是UTC毫秒格式,我想将该时间转换为设备当前时间 Date d = new Date(System.currentTimeMillis()); d.toLocaleString(); //to phone's locale d.toGMTString(); //in GMT String dat = new SimpleDateFormat

大家好,请大家告诉我如何将UTC时间转换为android设备的当前时间

实际上,当我们在手机上使用GPS服务时,我显示的是纬度、经度、高度和时间

这里的时间是UTC毫秒格式,我想将该时间转换为设备当前时间

Date d = new Date(System.currentTimeMillis());
d.toLocaleString(); //to phone's locale
d.toGMTString(); //in GMT
String dat = new SimpleDateFormat("ddMMyy").format(location.getTime())