For those that are a bit uneasy with using POSIX, Date::Format has a compatible strftime().
I'm not quite sure what little is on about below, with other languages, and Apache... =/
But Date::Format (or POSIX::strftime) is definitely what you're looking for.