Here you can find the source of getStringAcordFormat()
Parameter | Description |
---|---|
aDate | a parameter |
public static String getStringAcordFormat()
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**// w ww .ja v a 2 s .co m * * @param aDate * @return * */ /*==================================================================*/ public static String getStringAcordFormat() { SimpleDateFormat myFormatter = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss"); int currentOffset = myFormatter.getTimeZone().getRawOffset(); long diff = currentOffset + 18000000; Date currentDate = new Date(System.currentTimeMillis() - diff); String myFormattedDate = myFormatter.format(currentDate); return myFormattedDate; } }