date在传输过程中时区自动转换成了UTC
发布于 8 年前 作者 suntopo 3729 次浏览 来自 问答

时区由CST自动转成了UTC了,但是浏览器和server的时区都是一样的都是CST,那么这个转化是在哪里,什么时候发生的呢?

server 端数据

{ id: 74,
    orderNo: '201607180925030237868',
    phoneNo: '',
    phoneCost: 10000,
    phoneName: '',
    packageFee: 0,
    package:
    { id: 1,
        name: '购买裸机',
        price: 0,
        description: '',
        market: 3,
        created_at: Wed Jun 29 2016 09:10:38 GMT+0800 (CST),
        updated_at: Wed Jun 29 2016 09:10:38 GMT+0800 (CST),
        deleted_at: Invalid Date },
    period: 0,
        market: 3,
    user:
    { id: 3,
        name: '_zjdt',
        salt: '',
        phone: '15928726193',
        idCard: '',
        avatar: '',
        type: 'CLIENT',
        status: true,
        created_at: Wed Jun 29 2016 09:10:38 GMT+0800 (CST),
        updated_at: Wed Jun 29 2016 09:10:38 GMT+0800 (CST),
        deleted_at: Invalid Date },
    merchant: 2,
        remark: '1000',
    status: 'NEW',
    created_at: Mon Jul 18 2016 09:25:03 GMT+0800 (CST),
    updated_at: Mon Jul 18 2016 09:25:03 GMT+0800 (CST),
    deleted_at: Invalid Date,
    txnAmt: 10000,
    total_interest: 0,
    re_interest: 0,
    interest: 0 }

浏览器接受到的数据

    "order": {
        "id": 74,
            "orderNo": "201607180925030237868",
            "phoneNo": "",
            "phoneCost": 10000,
            "phoneName": "",
            "packageFee": 0,
            "package": {
            "id": 1,
                "name": "购买裸机",
                "price": 0,
                "description": "",
                "market": 3,
                "created_at": "2016-06-29T01:10:38.000Z",
                "updated_at": "2016-06-29T01:10:38.000Z",
                "deleted_at": null
        },
        "period": 0,
            "market": 3,
            "user": {
            "id": 3,
                "name": "_zjdt",
                "salt": "",
                "phone": "15928726193",
                "idCard": "",
                "avatar": "",
                "type": "CLIENT",
                "status": true,
                "created_at": "2016-06-29T01:10:38.000Z",
                "updated_at": "2016-06-29T01:10:38.000Z",
                "deleted_at": null
        },
        "merchant": 2,
            "remark": "1000",
            "status": "NEW",
            "created_at": "2016-07-18T01:25:03.000Z",
            "updated_at": "2016-07-18T01:25:03.000Z",
            "deleted_at": null,
            "txnAmt": 10000,
            "total_interest": 0,
            "re_interest": 0,
            "interest": 0
    }
回到顶部