"2016-10-06T12:09:18.303+0800"

Posted zno2

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了"2016-10-06T12:09:18.303+0800"相关的知识,希望对你有一定的参考价值。

Java 

    public static void main(String[] args) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd‘T‘HH:mm:ss.SSSZ");
        String dstr = sdf.format(new Date());
        System.out.println(dstr);

        Date d = sdf.parse("2016-10-06T12:09:18.303+0800");
        System.out.println(d);

    }

输出结果:

2016-10-06T12:10:30.429+0800
Thu Oct 06 12:09:18 CST 2016

 

javascript

    var d = new Date("2016-10-06T12:00:36.798+0800");
    console.dir(d);

输出结果:

Thu Oct 06 2016 12:00:36 GMT+0800 (中国标准时间)

 

T 是什么

http://www.w3schools.com/js/js_date_formats.asp

The T in the date string, between the date and time, indicates UTC time.

T = UTC

UTC (Universal Time Coordinated)  is the same as GMT (Greenwich Mean Time).

国际协调时(格林威治标准时间)

英国伦敦格林尼治天文台旧址所在位置为零度经线,划分24时区,中国为东8(+8)

+12 是一天中最早的

 

以上是关于"2016-10-06T12:09:18.303+0800"的主要内容,如果未能解决你的问题,请参考以下文章