Actually, this first patch worked great on my computer but not on the n900. A simpler (which avoids tricking strptime and all) patch is simply to handle the ValueError exceptions which are /probably/ caused by the extra AM/PM and to do the AM/PM conversion by hand. If the ValueError was not caused by this, it should occur again on the strptime-without-%p call anyway. I attached the corresponding patch. Works great on both my computer and n900 !