HTTP::date – format a date


require_once 'HTTP.php';

string HTTP::date ( integer time )


Converts a UNIX timestamp into an RFC compliant HTTP header line. This function honors the "y2k_compliance" php.ini directive.

The HTTP package is deprecated. Use HTTP2::date instead.


  • integer $time - a UNIX timestamp

Return value

string - a RFC compliant date header line


This function can be called statically.

HTTP (Previous) sends a "HEAD" command (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.