当前位置:网站首页>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边栏推荐
猜你喜欢

Android 开发用 Kotlin 编程语言 二 条件控制

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

【综合类型第 35 篇】程序员的七夕浪漫时刻

产品太多了,如何实现一次登录多产品互通?

多线程(进阶) - 2.5w字总结

使用Windbg过程中两个使用细节分享

化繁为简!阿里新产亿级流量系统设计核心原理高级笔记(终极版)

PG优化篇--执行计划相关项

登录功能和退出功能(瑞吉外卖)

GPU-CUDA-图形渲染分析
随机推荐
解决【命令行/终端】颜色输出问题
poj2287 Tian Ji -- The Horse Racing(2016xynu暑期集训检测 -----C题)
FPGA: Basic Getting Started LED Lights Blinking
【加密解密】明文加密解密-已实现【已应用】
How to choose coins and determine the corresponding strategy research
The fuse: OAuth 2.0 four authorized login methods must read
Chapter 5: Activiti process shunting judgment, judging to go to different task nodes
#yyds干货盘点#JS数组和树相互转化
R语言ggplot2可视化:可视化密度图(Density plot)、可视化多个分组的密度图、数据点分布在箱图中间、添加主标题、副标题、题注信息
Opencv算术操作
MySQL 中 auto_increment 自动插入主键值
E-sports, convenience, efficiency, security, key words for OriginOS functions
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
2022杭电杯超级联赛(5)
用KUSTO查询语句(KQL)在Azure Data Explorer Database上查询LOG实战
SkiaSharp 之 WPF 自绘 投篮小游戏(案例版)
Ali's new launch: Microservices Assault Manual, all operations are written out in PDF
导火索:OAuth 2.0四种授权登录方式必读
第九章:activit内置用户组设计与组任务分配和IdentityService接口的使用
上位机开发C#语言:模拟STC串口助手接收单片机发送数据