On 13/5/2011, at 8:32pm, Mick wrote: >>> ... >>> $ date +"%l:%M%P" >>> 8:39 >>> >>> That's the wall-clock time (p.m.) in my local time-zone. What Americans >>> call daylight savings time, though how they imagine any time is saved I >>> don't know. >> >> From `man date`: >> >> %l hour ( 1..12) >> >> ... >> %M minute (00..59) >> ... >> >> %p locale's equivalent of either AM or PM; blank if not known >> >> %P like %p, but lower case >> >> I'd be curious to compare with the output of `date +"%r"` on your system, >> but you probably actually want to set: >> >> LANG="en_GB.UTF-8" >> LC_TIME="POSIX" >> >> in order to get the correct results. > > Hmm ... I've just set my locale as you suggest and get: > > $ date +"%l:%M%P" > 8:29 > > (it's 20:29 right now) > > and > > $ date +"%r" > 08:31:28
Sorry, didn't see this message before sending my reply to your previous one. Yes, it should say "pm" at the end, but did you reboot before checking? I believe these are sourced at startup in a way that renders this necessary. You *may* be able to `export LC_TIME="POSIX"` in a shell, but I won't swear to it. Stroller.