The variable is called $wgLocalTZoffset, with lowercase O.
And php variable names are case-sensitive.
This commit is a simple
sed -i 's/wgLocalTZOffset/wgLocalTZoffset/' includes/Timestamp.php
Change-Id: Iddf9b363c9ddc95938ba8b5e0c134d9ec734109c
Changed logic in MWTimestamp::getHumanTimestamp so that
all the message and formatting was offloaded into the
Language class, keeping only actual timestamp logic in
the MWTimestamp class.
Also added a hook so extensions can override the
human timestamp format.
Change-Id: Ie667088010e24eb6cb569f9e8e8e2553005223eb
* Removed spaces around array index
* Removed double spaces or added spaces to begin or end of function
calls, method signature, conditions or foreachs
* Added braces to one-line ifs
* Changed multi line conditions to one line conditions
* Realigned some arrays
Change-Id: Ia04d2a99d663b07101013c2d53b3b2e872fd9cc3
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.
Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
Now if the difference between $now and $then is >= 30 days, "X months
ago" or "X years ago" is returned.
Month is defined as 30 days, but it shouldn't cause problems in this
case. The "X time ago" messages are approximate anyway.
Change-Id: I228a11e23783484b64c29db94c3607a415fa81a8
Figured since a JS Timestamp class was being implemented
it might be appropriate to create a complementary PHP
Timestamp class. Much of code is taken from wfTimestamp().
Note: Another change (I53dcf547) is attempting a related
issue. Not sure how much of scope overlap there is.
Change-Id: I68eb9f27eebe80df757187f634392e1bcba5551f
Signed-off-by: Tyler Romeo <tylerromeo@gmail.com>