请问js如何将下图这种类型的时间戳格式转换成dataTime格式

user_tYDk6iCh
  • 63

如图所示,调用接口获取了一组json格式的数据,其中creationTimestamp表示的是时间,请问前端如何将这一大段数据转换成2020-09-23 10:25:21这种dataTime格式的数据呢
image.png

            "creationTimestamp": {
                "iMillis": 1603337531000,
                "iChronology": {
                    "iBase": {
                        "iBase": {
                            "iBase": {
                                "iMinDaysInFirstWeek": 4
                            }
                        },
                        "iParam": {
                            "iZone": {
                                "iTransitions": [
                                    -9223372036854775808,
                                    -2177481943000,
                                    -933667200000,
                                    -922093200000,
                                    -908870400000,
                                    -888829200000,
                                    -881049600000,
                                    -767869200000,
                                    -745833600000,
                                    -733827600000,
                                    -716889600000,
                                    -699613200000,
                                    -683884800000,
                                    -670669200000,
                                    -652348800000,
                                    -650019600000,
                                    515527200000,
                                    527014800000,
                                    545162400000,
                                    558464400000,
                                    577216800000,
                                    589914000000,
                                    608666400000,
                                    621968400000,
                                    640116000000,
                                    653418000000,
                                    671565600000,
                                    684867600000
                                ],
                                "iWallOffsets": [
                                    29143000,
                                    28800000,
                                    32400000,
                                    28800000,
                                    32400000,
                                    28800000,
                                    32400000,
                                    28800000,
                                    32400000,
                                    28800000,
                                    32400000,
                                    28800000,
                                    32400000,
                                    28800000,
                                    32400000,
                                    28800000,
                                    32400000,
                                    28800000,
                                    32400000,
                                    28800000,
                                    32400000,
                                    28800000,
                                    32400000,
                                    28800000,
                                    32400000,
                                    28800000,
                                    32400000,
                                    28800000
                                ],
                                "iStandardOffsets": [
                                    29143000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000,
                                    28800000
                                ],
                                "iNameKeys": [
                                    "LMT",
                                    "CST",
                                    "CDT",
                                    "CST",
                                    "CDT",
                                    "CST",
                                    "CDT",
                                    "CST",
                                    "CDT",
                                    "CST",
                                    "CDT",
                                    "CST",
                                    "CDT",
                                    "CST",
                                    "CDT",
                                    "CST",
                                    "CDT",
                                    "CST",
                                    "CDT",
                                    "CST",
                                    "CDT",
                                    "CST",
                                    "CDT",
                                    "CST",
                                    "CDT",
                                    "CST",
                                    "CDT",
                                    "CST"
                                ],
                                "iID": "Asia/Shanghai"
                            },
                            "iID": "Asia/Shanghai"
                        }
                    }
                }
            },
回复
阅读 449
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
你知道吗?

宣传栏