Here you can find the source of getNowAsNICSDate()
public static String getNowAsNICSDate()
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; import org.joda.time.DateTime; public class Main { public static String getNowAsNICSDate() { return getTimeFromMillisAsNICSDate(getNowAsMillis()); }/* w ww . ja va2s . c om*/ public static String getTimeFromMillisAsNICSDate(long timeInMillis) { SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); fmt.setTimeZone(TimeZone.getTimeZone("UTC")); return fmt.format(getDateFromMillis(timeInMillis)); } public static long getNowAsMillis() { DateTime now = new DateTime(); return now.getMillis(); } public static Date getDateFromMillis(long millis) { Date date = null; try { DateTime dt = new DateTime(millis); date = dt.toDate(); } catch (Exception e) { } return date; } }