如何获取“ yyyy-MM-ddTHH:mm:ss.fffZ”的格式在PHP中? [英] How do I get the format of "yyyy-MM-ddTHH:mm:ss.fffZ" in php?
本文介绍了如何获取“ yyyy-MM-ddTHH:mm:ss.fffZ”的格式在PHP中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要使用 yyyy-MM-ddTHH:mm:ss.fffZ
的日期时间格式来创建用于与.NET服务器通信的哈希。如何在PHP中获得该格式?我什至不知道什么是 fffZ甚至是试图自己弄清楚而无法在线找到它。非常感谢您的帮助。
I need to get a datetime format of yyyy-MM-ddTHH:mm:ss.fffZ
to use in creating a hash to talk with a .NET server. How can I get that format in PHP? I don't know what "fffZ" even is to try to figure this out myself and can't find it online. Help is greatly appreciated.
谢谢,
James
Thanks, James
推荐答案
使用PHP可以通过以下方式获得它:
Using PHP you can get it in this way:
date('Y-m-dTH:i:s.uZ') //for the current time
您可以找到每个字符参阅文档。尽管我不确定 Z
在两种语言中的含义是否相同。
You can find each character at the documentation. Although I'm not sure if the Z
means the same in both languages.
这篇关于如何获取“ yyyy-MM-ddTHH:mm:ss.fffZ”的格式在PHP中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文