Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- Calendar calobj = Calendar.getInstance();
- System.out.println(df.format(calobj.getTime()));
- new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'");
- ZonedDateTime dateTime = ZonedDateTime.now();
- System.out.println(DateTimeFormatter.ISO_INSTANT.format(dateTime));
- DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX");
- df.setTimeZone(TimeZone.getTimeZone("UTC"));
- Calendar calobj = Calendar.getInstance();
- System.out.println(df.format(calobj.getTime()));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement