in reply to Converting POSIX format date/times to epoch seconds

Given that you know how to parse the users' preferred date format -- i.e. you can easily split it up into components (sec, min, hr, date, month year), another thing you can try is Time::Local -- it's part of the core Perl distro, so everybody has it.

It exports a function called "timelocal", which just converts those components to seconds since the epoch (i.e. it's the "opposite" of localtime).

  • Comment on Re: Converting POSIX format date/times to epoch seconds