Advertisement
psi_mmobile

Untitled

Feb 21st, 2020
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1.         DateFormat utcFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
  2.         utcFormat.setTimeZone(this.TIME_ZONE);
  3.         String dateString = utcFormat.format(date);
  4.  
  5.         DateFormat df = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
  6.  
  7.         try {
  8.             date.setTime(df.parse(dateString).getTime());
  9.         } catch (ParseException e) {
  10.             e.printStackTrace();
  11.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement