[dev] Kronolith(Git) can't add event if I use 12h time format

Hiromi Kimura hiromi at tac.tsukuba.ac.jp
Fri Feb 18 05:45:15 UTC 2011


Hello,
I can't add event to Kronolith(git) local calendar if I use 12h time format.
24h time format is OK.
The warning says "You used an unknown time format ...".

Since I logged in horde as Japanese, I modify the js/date/ja_JP.js regex
pattern to match Japanese AM/PM designor characters.
But, still can't add event and no errors seen.
Finaly, I found a bug in kronolith/lib/Event.php ,
at line 2095.
        setlocale(LC_TIME, 'C');
At that point of code, the form data already submitted in locale format.
So, switching the LC_TIME to 'C' prevent the conversion.

I made the patch only for japanese, but same fix will be required for
ar-SY, cs-CZ, el-GR, et-EE, fa-IR, hu-HU, ko-KR, zh-CN and zh-TW.
I tested on FreeBSD7.3+PHP-5.2 and Ubuntu10.04+PHP-5.3.
-=-=-=-=-
Hiromi Kimura http://www.tac.tsukuba.ac.jp/~hiromi/
PGP Fingerprint16 = 2A 27 2E 46 9E 75 4E 3D  E3 FD 5A DC 2A AA 3A 2E
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kronolith-git.diff
Type: text/x-patch
Size: 1260 bytes
Desc: not available
URL: <http://lists.horde.org/archives/dev/attachments/20110218/0bc01fa1/attachment.bin>


More information about the dev mailing list