Fix: Use the current locale for CTCP-Time replies. #136

Closed
wants to merge 1 commit into from

2 participants

@Xeago

CTCP Time is supposed to return the local time of the client,
not the GMT time which [[NSDate date] description] returns.

https://en.wikipedia.org/wiki/Client-to-client_protocol#Common_CTCP_Commands

Before:

2013-01-10 19:02:50 +0000

After:

Thursday, January 10, 2013 7:02:50 PM Central European Time
@Xeago Xeago Fix: Use the current locale for CTCP-Time replies.
CTCP Time is supposed to return the local time of the client,
not the GMT time which [[NSDate date] description] returns.

https://en.wikipedia.org/wiki/Client-to-client_protocol#Common_CTCP_Commands

Before:

    2013-01-10 19:02:50 +0000

After:

    Thursday, January 10, 2013 7:02:50 PM Central European Time
1143987
@psychs psychs closed this Jul 2, 2013
@psychs
Owner

Thanks. But with this patch, users in ja_JP locale will return "2013年7月2日 火曜日 8時34分56秒 日本標準時". I think it's not good for most people. I pushed a patch to fix the issue so that CTCP time replies contain time zones.

@Xeago

Thanks, I don't have much experience with Cocoa. This was the first method I found that gave information including the time-zone. I hope my code served with good intent.

Thanks for improving my code and providing a better solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment