当前位置:网站首页>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边栏推荐
- [nvme2.0b 14-7] set features (Part 1)
- 基于Svelte3.x桌面端UI组件库Svelte UI
- 自制GIF动态图-gifcam
- Redis design and Implementation (II) | database (deletion strategy & expiration elimination strategy)
- Qt连接神通数据库
- Qqquickpainteditem implements graffiti program drawing board
- 【付费推广】常见问题合集,推荐榜单FAQ
- 在浏览器输入url到页面展示出来
- 示波器探头对测量电容负荷有影响吗?
- Graffiti Wi Fi & ble SoC development slide strip
猜你喜欢

Flink SQL 自定义 Connector

【kotlin 协程】万字协程 一篇完成kotlin 协程进阶
![[kotlin collaboration process] complete the advanced kotlin collaboration process](/img/43/9c4b337caf406537e317dea2ed5f17.png)
[kotlin collaboration process] complete the advanced kotlin collaboration process

swagger使用

C#访问MongoDB并执行CRUD操作

将线程绑定在某个具体的CPU逻辑内核上运行

Interference source current spectrum test of current probe

【NVMe2.0b 14-1】Abort、Asynchronous Event Request、Capacity Management command

Swagger use

Detectron2 source code reading 3-- encapsulating dataset with mapper
随机推荐
Unsupportedclassversionerror is reported when starting jar package. How to repair it
Enhance the add / delete operation of for loop & iterator delete collection elements
Build a docker image of Henkel database from 0
Redis design and Implementation (VII) | publish & subscribe
【NVMe2.0b 14-6】Format NVM、Keep Alive、Lockdown command
电流探头的干扰源电流谱测试
Dart tips
微信公众号第三方平台开发,零基础入门。想学我教你啊
Icon resources
C# ListBox如何获取选中的内容(搜了很多无效的文章)
证券开户的优惠怎样才能得到?在线开户安全?
[untitled]
PHP API to obtain QR code and combine to generate pictures
Gilbert Strang's course notes on linear algebra - Lesson 1
CUDA implements matrix replication
127.0.0.1, 0.0.0.0 and localhost
Wechat official account third-party platform development, zero foundation entry. I want to teach you
icon资源
技术管理进阶——管理者如何进行梯队设计及建设
What are the Amazon evaluation terms?