/** * Get a timestamp string in one of various formats * * @param mixed $outputtype A timestamp in one of the supported formats, the * function will autodetect which format is supplied and act accordingly. * @param mixed $ts Optional timestamp to convert, default 0 for the current time * @return string|bool String / false The same date in the format specified in $outputtype or false */ function wfTimestamp($outputtype = TS_UNIX, $ts = 0) { $ret = MWTimestamp::convert($outputtype, $ts); if ($ret === false) { wfDebug("wfTimestamp() fed bogus time value: TYPE={$outputtype}; VALUE={$ts}\n"); } return $ret; }