Manual:WfTimestamp/fr

Overview
(part of GlobalFunctions.php) provides functionality to convert between common timestamp formats, including MediaWiki timestamps, UNIX timestamps, MySQL   format, RFC 2822 format and more. See formats below for a full list.

Les dates seront générées sans fuseau horaire ou bien dans le fuseau GMT, selon le format particulier choisi.

Never use wfTimestamp when inserting a timestamp into the database. This will break in Postgres and possibly other non-MySQL databases. Instead use $dbw->timestamp

Utilisation
 


 * Returns a timestamp of type string in the format specified by the  argument.
 * Throws  if an incorrect formats is passed via the   argument.
 * Returns  if an invalid or unrecognized timestamp is passed via the   argument.


 * Call with no arguments to return the current time in UNIX time format.


 * Call with one argument to return the current time in the specified format.


 * Call with two arguments to return an arbitrary timestamp in the specified format.

Note that the timestamp can be in any format that  can output.