Page MenuHomePhabricator

wrong day of the week of Ko:
Closed, ResolvedPublic

Description

Author: klutzy.wikipedia

Description:
signature makes strange day of the week at ko:wp.
for example, see this:
http://ko.wikipedia.org/w/index.php?title=%EC%9C%84%ED%82%A4%EB%B0%B1%EA%B3%BC:%EC%82%AD%EC%A0%9C_%ED%86%A0%EB%A1%A0/LG%EC%A0%84%EC%9E%90_%EC%8B%B8%EC%9D%B4%EC%96%B8_%ED%9C%B4%EB%8C%80%ED%8F%B0_%EC%98%A4%EB%A5%98&direction=next&oldid=438518
"2006년 8월 5일 (일)" means "05/08/2006 sun", but the correct day is sat. bug
appears in the afternoon of KST, but not in the morning.


Version: 1.8.x
Severity: normal

Details

Reference
bz6940

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:17 PM
bzimport set Reference to bz6940.
bzimport added a subscriber: Unknown Object (MLST).

Please confirm whether still present or fixed.

klutzy.wikipedia wrote:

still present. :$

The day regression should have no problem since r15927,
however, may anyone please check the messages in MessagesKo.php is that assigned as
a correct value?

http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/MessagesKo.php?
r1=15823&r2=15919

the day messages from r15823 is shown as follows:

'sunday' => '일요일',
'monday' => '월요일',
'tuesday' => '화요일',
'wednesday' => '수요일',
'thursday' => '목요일',
'friday' => '금요일',
'saturday' => '토요일',
'sun' => '일',
'mon' => '월',
'tue' => '화',
'wed' => '수',
'thu' => '목',
'fri' => '금',
'sat' => '토',

klutzy.wikipedia wrote:

yes, messages are correct.
I guess there is a problem between of UTC and KST because bug occurs only at
evening.

As far as I can see this actually should work correctly for signatures
(since timezone is set by surrounding code), but incorrectly everywhere
else (since timezone is not set, so will default to UTC on our servers).

Can you confirm that the problem is with signatures and nowhere else?
Or that it's with everything *but* signatures?

klutzy.wikipedia wrote:

too late. sorry :$

problem is only with signatures. i didn't see any day bug else.

tokigun wrote:

Possible solution to this bug

I believe this bug is caused by Language::sprintfDate. Parser::pstPass2 calls
Language::timeanddate with timestamp as server-local timezone, but sprintfDate
seems to parse this timestamp as UTC. I solved this replacing date() to
gmdate().

This patch looks working at least in my laptop, though I haven't check it in
other machines. It needs more verification.

  • Kang Seonghoon aka Tokigun

Attached:

tokigun wrote:

Oops, I have made mistake in comment #7 above. Actually sprintfDate accepts
timestamp as server-local timezone, but it uses date() instead of gmdate()
resulting doubled timezone, for example UTC+18:00 instead of UTC+09:00.

  • Kang Seonghoon aka Tokigun

Does this problem still happen?

klutzy.wikipedia wrote:

No. It seems to be fixed a few years ago.