当前位置:网站首页>How to format an UTC date to use the Z (Zulu) zone designator in php?
How to format an UTC date to use the Z (Zulu) zone designator in php?
2022-06-30 08:42:00 【Saffron】
problem :
I need to display and handle UTC dates in the following format: I need to display and process in the following format UTC date :
2013-06-28T22:15:00Z2013-06-28T22:15:00Z
As this format is part of the ISO8601 standard I have no trouble creating DateTime objects from strings like the one above. Because this format is ISO8601 Part of the standard , So I can easily create... From the above string DateTime object .However I can't find a clean way (meaning no string manipulations like substr and replace, etc.) to present my DateTime object in the desired format. But I can't find a clean way ( It means there is no such thing as substr and replace Wait for string operation ) To display my... In the desired format DateTime object .I tried to tweak the server and php datetime settings, with little success. I try to adjust the server and php Date and time settings , But to little effect .I always get: I always get :
$date->format(DateTime::ISO8601); // gives 2013-06-28T22:15:00+00:00Is there any date format or configuration setting that will give me the desired string? Is there any date format or configuration setting that can provide me with the required string ?Or I'll have to append the 'Z' manually to a custom time format? Or I have to manually “Z” Attach to custom time format ?
Solution :
Reference resources : https://stackoom.com/en/question/1Ay8W边栏推荐
- Flink SQL 自定义 Connector
- Advanced technology management -- how managers design and build echelons
- Unit Test
- Redis design and Implementation (VII) | publish & subscribe
- Mmcv expanding CUDA operator beginner level chapter
- Alcohol tester scheme: what principle does the alcohol tester measure alcohol solubility based on?
- Introduction to MySQL foundation power node [Lao Du] class assignment
- Redis设计与实现(一)| 数据结构 & 对象
- Circuit analysis of current probe
- C accesses mongodb and performs CRUD operations
猜你喜欢

Self made GIF dynamic graph -gifcam

Flink Sql -- toAppendStream doesn‘t support consuming update and delete changes which

VIM from dislike to dependence (21) -- cross file search

Redis设计与实现(七)| 发布 & 订阅

codeforces每日5题(均1700)-第三天

Codeworks 5 questions per day (1700 for each) - the third day

Redis design and Implementation (VI) | cluster (sharding)

1. Problems related to OpenGL window and environment configuration

电流探头电路分析

Redis设计与实现(二)| 数据库(删除策略&过期淘汰策略)
随机推荐
mysql基础入门 day4 动力节点[老杜]课堂笔记
[untitled]
国债逆回购绝对安全吗 网上怎么开户
[untitled]
Flink sql -- No factory implements ‘org.apache.flink.table.delegation.ExecutorFactory‘.
Redis设计与实现(六)| 集群(分片)
Emoji icons supported by markdown
启动jar包报错UnsupportedClassVersionError,如何修复
Comparaison de deux façons d'accéder à la base de données SQL Server (sqldatareader vs sqldataadapter)
Unity简单shader
Advanced technology management -- how managers design and build echelons
C accesses mongodb and performs CRUD operations
Flink Sql -- toAppendStream doesn‘t support consuming update and delete changes which
【付费推广】常见问题合集,推荐榜单FAQ
C#訪問SQL Server數據庫兩種方式的比較(SqlDataReader vs SqlDataAdapter)
TiDB v6.0.0 (DMR) :缓存表初试丨TiDB Book Rush
[kotlin collaboration process] complete the advanced kotlin collaboration process
Occasionally, Flink data is overstocked, resulting in checkpoint failure
【NVMe2.0b 14-2】Create/Delete Queue
Wechat official account third-party platform development, zero foundation entry. I want to teach you