我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

我需要将它转换为人类可读的时间戳

So i have a timestamp which i need to convert to human readable format however I cannot figure out which functions I need to use and which format this is.

20180129T220300Z

That is the timestamp and I need to convert that to human readable GMT +10 using PHP.

Timestamp response

I don't exactly know the name, but you can use it with the DateTime class.

<?php
$date = new DateTime('20180129T220300Z');
echo $date->format('Y-m-d H:i:s'); // 2018-01-29 22:03:00
?>

More information about the class and its methods over here...

近期文章

  • c语言写一个函数,使字符串求逆序数输出
  • Java向数据库中填加属性值
  • DBeaver可以导入.dmp文件吗
  • 我希望能把这个排序弄成函数定义调用,但是现在我又成了下面这种,我看不懂
  • 长时序列sar怎么进行物候提取?
  • docker 前端打包 缓存
  • 求一个能进行web测试的开源网站
  • 【求助】deepin系统安装失败
  • 单片机程序,问题出在哪
  • 在Woocommerce单品页面上排除特定的产品类别
  • 学习课程如何选择 我是CSDN年费会员
  • VMWare截图时未响应
  • VHDL语言中inout信号在仿真中如何作为输入赋值
  • qt6中信号和槽的连接问题
  • 如何在eclipse中将console中的内容显示在Jframe的文本框中?
  • Python:特征人脸识别pca
  • 求解答,形参怎么改才对?
  • 子系统技术规范SSTS
  • VIsual studio制作快捷功能
  • vagrant reload --provision是错误的说运行作曲家为“root”,我该怎么办?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华