getting thunderbird to use yyyy-MM-dd HH:MM date format

thunderbird is a terrific mail application (“mail user agent” is the posh name, i believe).

pretty much the only thing i don’t like about it though is its way of formatting the date and time and not providing a way of letting me configure the date format via preferences. it got bad enough that i recently spent a bit of time to figure out how get thunderbird to display date and time in yyyy-MM-dd HH:MM format — that is, 2011-04-13 20:34 instead of 04/13/2011 08:34pm or something similarly silly.

the solution was hiding in a forum post on the ubuntu forum: by switching the locale (well, at least parts of it) to en_DK.utf8 thunderbird would use the yyyy-MM-dd HH:MM format (aka ISO date–time format).

here’s how i did that on ubuntu:

[sourcecode language=”bash”] # first: create a diversion of the normal /usr/bin/thunderbird dpkg-divert –divert /usr/bin/thunderbird.ubuntu –rename –local –add /usr/bin/thunderbird # next: create our locale setting wrapper cat <<HERE >/usr/bin/thunderbird #!/bin/bash export LC_TIME=en_DK.utf8 export LC_PAPER=en_DK.utf8 export LC_MEASUREMENT=en_DK.utf8 exec /usr/bin/thunderbird.ubuntu "$@" HERE chmod a+x /usr/bin/thunderbird [/sourcecode]

that should do the trick.