For cases where you already have a DateTime object on hand and want to
use MWTimestamp's formatting code. Since MWTimestamp stores DateTime
objects internally, just set it to the $timestamp member variable.
Change-Id: Ie60392e32743d4d082d2c9347ef68418d5eb86ad
MWTimestamp::getTimezoneString() returns the timezone name as a message,
that supports wiki localization. The code is moved from Parser::pstPass2.
The default file revert message is currently always in UTC.
This patch sets the default timestamp to be in the wiki timezone (similar
to ~~~~). The timezone is passed as a new parameter to the message, with
the date / time parameters being merged and handled by
$wgContentLang->timeanddate
Bug: T36948
Change-Id: I48772f5f3b1635d33b6185776cedfc4ee1882494
* This avoids "wfTimestamp() fed bogus time value" errors
that show up in the debug log on page views, do to
User::getTouched() usage.
Change-Id: I899d6edd2b59c02e618ed14f8d29dea53d866f05
We're trying to remove MediaWiki dependencies from MWTimestamp so it can
be split out into a separate library. In addition to getting rid of a
dependency on RequestContext, Language, and User, it makes more logical
sense there anyways.
Bug: T100924
Change-Id: If46eaea42d8a5a808c10f0dc353e181714295a44
TS_MW is a 14-character string "YYYYMMDDHHIISS", and thus cannot
represent timestamps earlier than 00000101000000 or later than
99991231235959.
MWTimestamp should throw an exception if asked to represent out-of-range
times in this format, rather than returning invalid values that are
likely to be truncated by the database.
Bug: T51580
Change-Id: I744e446356f3ed9193dfaaaec5dc81c611dab4a3
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling
Change-Id: I783e4dbfe5f6f98b32b9a03ccf6439e13e132bcc
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I7f605aa9e117b5fd80d9b1440864fe526d2b14a5