in reply to Using timelocal function

I'm not sure what your question is. Maybe if you posted some code with notes about what you'd like it to do, that would help.

You mention that you get 18000 when you wanted to get zero. I notice that this is five hours, and I wonder if that's how far your time zone is away from where the epoch date is midnight.

If the real problem is how to get the number of days since Jan 1, 1968, then there are a lot of date and time modules out there to help. For example, using DateTime...

use DateTime; my $epoch = DateTime->new( year => 1968, month => 1, day => 1, hour => 0, minute => 0, second => 0, time_zone => 'America/Chicago' ); my $now = DateTime->now(); my $duration = $now->delta_days( $epoch ); print $duration->delta_days(), "\n"; __END__ 14644

See also How do I find the difference in days between two dates, in a cool perl way?