Reference:
http://blog.csdn.net/u012992462/article/details/47042535
Http://www.cnblogs.com/kissdodog/p/5419923.html
Content:
Usually JSON time is typically in this format.
/date (1436595149269)/
Usually we use Ajax to get down the JSON data, if there is time, is in this format. Among them, the median number "1436595149269" represents the number of milliseconds since January 1, 1970.
This time format is not directly visible to the user because this is a time that humans do not understand. So we need to convert it into a time format that normal people can understand.
1 ImportJava.text.SimpleDateFormat;2 Importjava.util.Date;3 ImportJava.util.TimeZone;4 5 6 Public classTestjsondate {7 8 9 /**Ten * Date converted to JSON will become a series of numbers, how to convert the number to a date One */ A Public Static voidMain (string[] args) { - Longunixstamp=1437646938000l; -Date dt=NewDate (unixstamp); theSimpleDateFormat SDF =NewSimpleDateFormat ("Yyyy-mm-dd HH:mm:ss"); -Sdf.settimezone (Timezone.gettimezone ("Gmt+8")); - System.out.println (Sdf.format (DT)); - } + - + A}
JSON time conversion format (converts the digital time to a visual YYYY-MM-DD HH:MM:SS format)