zoukankan      html  css  js  c++  java
  • "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 是一天中最早的

  • 相关阅读:
    冲刺(六)
    冲刺(五)
    冲刺(四)
    团队产品开发
    冲刺(三)
    冲刺(二)
    冲刺(一)
    电梯演讲,模型展示
    校园健康行的NABCD分析
    团队博客
  • 原文地址:https://www.cnblogs.com/zno2/p/5933772.html
Copyright © 2011-2022 走看看