Just in case you're too lazy to split up your date string into something that Time::Local can handle, and don't mind slurping in 240k of Perl code, you could also use the module Date::Manip
#!/usr/bin/perl use Date::Manip qw(UnixDate); my $time_new = 'Tue Feb 13 19:04:04 IST 2007'; my $time = UnixDate($time_new, "%s"); print "secs since the Epoch: $time\n"; # prints 1171373644
In reply to Re: [OT] Number of seconds from epoch
by almut
in thread [OT] Number of seconds from epoch
by sanPerl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |