in reply to localtime/strftime not behaving as expected

Question answered (more or less) above; now a suggestion:

For a job like this, you probably want to use Devel-NYTProf, Devel::DProf or Devel::Profile (the first tends to be preferred these days).

If you didn't program your executable by toggling in binary, it wasn't really programming!