This code ...
<?php
setlocale(LC_TIME, 'en_CA');
$time = strtotime("07:00 PM");
echo strftime('%l:%M %P', $time);
?>
provides this result on OSX 10.6.4 with stock PHP 5.3.2 or PHP 5.2.13 from macports:
7:00 P
however I get the desired result on Ubuntu 9.10 with PHP 5.2.10:
7:00 pm
Why the difference? How can I fix it?