当前位置:网站首页>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边栏推荐
- A small test of basic grammar, Go lang1.18 introductory refining tutorial, from Bai Ding to Hongru, basic grammar of go lang and the use of variables EP02
- TiDB 6.0 Placement Rules In SQL 使用实践
- 【综合类型第 35 篇】程序员的七夕浪漫时刻
- uniapp中的view高度设置100%
- MMDetection实战:MMDetection训练与测试
- flutter 服务器返回数据判断是否为空
- 【翻译】混沌网+SkyWalking:为混沌工程提供更好的可观察性
- 【OpenCV】-仿射变换
- 【加密解密】明文加密解密-已实现【已应用】
- PG优化篇--执行计划相关项
猜你喜欢
随机推荐
Android 开发用 Kotlin 编程语言三 循环控制
牛刀小试基本语法,Go lang1.18入门精炼教程,由白丁入鸿儒,go lang基本语法和变量的使用EP02
大佬们 我是新手,我根据文档用flinksql 写个简单的用户访问量的count 但是执行一次就结束
DocuWare平台——文档管理的内容服务和工作流自动化的平台详细介绍(下)
nyoj86 找球号(一) set容器和二分 两种解法
STM32入门开发:编写XPT2046电阻触摸屏驱动(模拟SPI)
R语言ggplot2可视化:可视化密度图(Density plot)、可视化多个分组的密度图、数据点分布在箱图中间、添加主标题、副标题、题注信息
5G NR 系统消息
Use KUSTO query statement (KQL) to query LOG on Azure Data Explorer Database
化繁为简!阿里新产亿级流量系统设计核心原理高级笔记(终极版)
How to choose coins and determine the corresponding strategy research
例题 可达性统计+bitset的使用
Microcontroller: temperature control DS18B20
导火索:OAuth 2.0四种授权登录方式必读
数据可视化(一)
SMB + SMB2: Accessing shares return an error after prolonged idle period
自定义过滤器和拦截器实现ThreadLocal线程封闭
OpenHarmony如何查询设备类型
如何用Golang来手写一个Blog - Milu.blog 开发总结
nyoj754 黑心医生 结构体优先队列









