1OffsetDateTime now = OffsetDateTime.now(ZoneOffset.UTC);
2System.out.println(now);
1private static Date getCurrentUtcTime() throws ParseException {
2 SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MMM-dd HH:mm:ss");
3 simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
4 SimpleDateFormat localDateFormat = new SimpleDateFormat("yyyy-MMM-dd HH:mm:ss");
5 return localDateFormat.parse( simpleDateFormat.format(new Date()) );
6}