Shortcut for ConvertableTimestamp::convert() for the current time.
Change-Id: I1c34c0a59bb57652c7a2e959836c8ba400a25f49
*/
function wfTimestampNow() {
# return NOW
- return MWTimestamp::convert( TS_MW, time() );
+ return MWTimestamp::now( TS_MW );
}
/**
}
}
+ /**
+ * Get the current time in the given format
+ *
+ * @param int $style Constant Output format for timestamp
+ * @return string
+ */
+ public static function now( $style = TS_MW ) {
+ return static::convert( $style, time() );
+ }
+
/**
* Get the timestamp represented by this object in a certain form.
*