当前位置:网站首页>What do T and Z in the time format 2020-01-13T16:00:00.000Z represent and how to deal with them
What do T and Z in the time format 2020-01-13T16:00:00.000Z represent and how to deal with them
2022-08-05 10:57:00 【not asking for help 0】
Reprint
T means delimiter, Z means UTC.
UTC: Universal Standard Time, adding 8 hours to the standard time, that is, the East Eighth District Time, which is Beijing Time.
Example
Beijing time: 2020-01-14 00:00:00 The corresponding international standard time format is: 2020-01-13T16:00:00.000Z
String dateTime = "2020-01-13T16:00:00.000Z";dateTime = dateTime.replace("Z", " UTC");SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z");SimpleDateFormat defaultFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");try {Date time = format.parse(dateTime);String result = defaultFormat.format(time);System.out.println(result);} catch (Exception e) {e.printStackTrace();}// Output result: 2020-01-14 00:00:00边栏推荐
猜你喜欢

微服务结合领域驱动设计落地

微信小程序标题栏封装

linux下oracle常见操作以及日常积累知识点(函数、定时任务)

The host computer develops C# language: simulates the STC serial port assistant to receive the data sent by the microcontroller

Login function and logout function (St. Regis Takeaway)

In-depth understanding of timeout settings for Istio traffic management

软件测试之集成测试

Voice-based social software development - making the most of its value

5G NR 系统消息

ECCV 2022 | 视听分割:全新任务,助力视听场景像素级精细化理解
随机推荐
RT-Thread记录(一、RT-Thread 版本、RT-Thread Studio开发环境 及 配合CubeMX开发快速上手)
ECCV 2022 | 视听分割:全新任务,助力视听场景像素级精细化理解
The fuse: OAuth 2.0 four authorized login methods must read
Import Excel/CSV from Sub Grid within Dynamics 365
Common operations of oracle under linux and daily accumulation of knowledge points (functions, timed tasks)
2022 Hangzhou Electric Power Multi-School Session 6 1008.Shinobu Loves Segment Tree Regular Questions
#yyds干货盘点#【愚公系列】2022年08月 Go教学课程 001-Go语言前提简介
记2022年七夕感慨
Login function and logout function (St. Regis Takeaway)
学生信息管理系统(第一次.....)
MMDetection实战:MMDetection训练与测试
This notebook of concurrent programming knowledge points strongly recommended by Ali will be a breakthrough for you to get an offer from a big factory
Create a Dapp, why choose Polkadot?
Ali's new launch: Microservices Assault Manual, all operations are written out in PDF
[Android]如何使用RecycleView in Kotlin project
【OpenCV】-仿射变换
【AGC】增长服务1-远程配置示例
数分面试(一)----与业务相关
FPGA: Use of the development environment Vivado
用KUSTO查询语句(KQL)在Azure Data Explorer Database上查询LOG实战