How to convert a date to UTC

date, java

Solution

String lv_dateFormateInUTC=""; //Will hold the final converted date      
SimpleDateFormat lv_formatter = new SimpleDateFormat(); 
lv_formatter.setTimeZone(TimeZone.getTimeZone("UTC"));  
lv_dateFormateInUTC = lv_formatter.format(lv_localDate); 

Something like that...!!

Problem

I need to change de format of a date to UTC format. File file = new File(); ... file.lastModified(); I need to convert the lastModified date of a file in UTC format.

Original source