DATE_RFC3339(string) 与DATE_ATOM相同。 DATE_RFC3339_EXTENDED(string) RFC 3339 EXTENDED 格式(示例:2005-08-15T15:52:01.000+00:00) DATE_RSS(string) RSS(示例:Mon, 15 Aug 2005 15:52:01 +0000). 别名DATE_RFC1123. DATE_W3C(string) 万维网联盟(示例:2005-08-15T15:52:01+00:00...
public getTimezone ( void ) : DateTimeZone public __wakeup ( void ) }更新日志 版本说明 7.2.0 DateTime 的类常量现在定义在 DateTimeInterface 上。 7.0.0 新增常量:DATE_RFC3339_EXTENDED 和DateTime::RFC3339_EXTENDED。 5.5.0 实现DateTimeInterface 接口。 5.4.24 COOKIE 格式从 2 位数字表示年份...
DATE_RFC3339 Same as DATE_ATOM (since PHP 5.1.3) DATE_RFC3339_EXTENDED RFC3339 Extended format (since PHP 7.0.0) (example: 2019-01-18T16:34:01.000+00:00) DATE_RSS RSS (Fri, 18 Jan 2019 14:13:03 +0000) DATE_W3C World Wide Web Consortium (example: 2019-01-18T14:13:03+00:00...
DateTimeInterface::RFC3339 string DATE_RFC3339 同DATE_ATOM(自 PHP 5.1.3 版本可用) DateTimeInterface::RFC3339_EXTENDED string DATE_RFC3339_EXTENDED RFC 3339 EXTENDED 格式(示例:2005-08-15T15:52:01.000+00:00) DateTimeInterface::RSS string DATE_RSS RSS(示例:Mon, 15 Aug 2005 15:52:01 +...
$payload= (string)$request->getBody();// Prior to 7.3 PHP does not support RFC3339_EXTENDED (milliseconds are broken)$version=explode('.',PHP_VERSION);$dateFormat= ($version[0] ==7&&$version[1] >=3) ? \DateTime::RFC3339_EXTENDED:"Y-m-d?H:i:s.???P";$rules= ['paymentOrder...
Specifically, it will use the \DateTimeInterface::RFC3339_EXTENDED format for the string when serializing. The timestamp will then appear in the serialized output as a normal string. When deserializing, it will accept any datetime format supported by DateTime's constructor. DateTimeZoneExporter: ...
RFC3339_EXTENDED="Y-m-d\TH:i:s.vP";conststring DateTimeInterface::RSS="D, d M Y H:i:s O";conststring DateTimeInterface::W3C="Y-m-d\TH:i:sP";/* Methods */public __construct([string $time="now"[,DateTimeZone $timezone=NULL]])public DateTime add(DateInterval $interval)public...
新建只能用于创建实例。使您的构造函数期望该日期格式为默认格式,这样您就不需要传递它。
cgi.rfc2616_headers 0 0 fastcgi.error_header no value no value fastcgi.logging 1 1 fpm.config no value no value Core PHP Version 7.4.33 DirectiveLocal ValueMaster Value allow_url_fopen On On allow_url_include Off Off arg_separator.input & & arg_separator.output & & auto_append_file ...
const string DateTimeInterface::RFC3339_EXTENDED = "Y-m-d\TH:i:s.vP" ; const string DateTimeInterface::RSS = "D, d M Y H:i:s O" ; const string DateTimeInterface::W3C = "Y-m-d\TH:i:sP" ; /* 方法 */ public __construct ([ string $time = "now" [, DateTimeZone $timezone...