当前位置:网站首页>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
边栏推荐
- Go编译原理系列6(类型检查)
- 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
- PostgreSQL 2022 报告:流行度上涨,开源、可靠性和扩展是关键
- 数据可视化(二)
- R语言使用yardstick包的pr_curve函数评估多分类(Multiclass)模型的性能、查看模型在多分类每个分类上的ROC曲线(precision(精准率),R代表的是recall(召回率)
- Create a Dapp, why choose Polkadot?
- [Android] How to use RecycleView in Kotlin project
- 【心里效应】98 个著名的心理效应
- 5G NR 系统消息
- 【MySQL基础】-【数据处理之增删改】
猜你喜欢
随机推荐
【加密解密】明文加密解密-已实现【已应用】
今天告诉你界面控件DevExpress WinForms为何弃用经典视觉样式
RT - Thread record (a, RT, RT Thread version - Thread Studio development environment and cooperate CubeMX quick-and-dirty)
#yyds干货盘点#JS数组和树相互转化
Android 开发用 Kotlin 编程语言 二 条件控制
Go编译原理系列6(类型检查)
abc262-D(dp)
FPGA:开发环境Vivado的使用
linux下oracle常见操作以及日常积累知识点(函数、定时任务)
提取人脸特征的三种方法
张朝阳对话俞敏洪:一边是手推物理公式,一边是古诗信手拈来
FPGA: Use of the development environment Vivado
华为分析&联运活动,助您提升游戏总体付费
FPGA: Basic Getting Started Button Controlling LED Lights
Detailed explanation of PPOCR detector configuration file parameters
Go学习笔记(篇二)初识Go
【深度学习】mmclassification mmcls 实战多标签分类任务教程,分类任务
Voice-based social software development - making the most of its value
#yyds干货盘点#【愚公系列】2022年08月 Go教学课程 001-Go语言前提简介
Chapter 5: Activiti process shunting judgment, judging to go to different task nodes