I need a quick way to convert date "Tue Jul 02 17:50:55 MDT 2024" into epoch time.
Effectively, I need the shell equivalent of date -d "Tue Jul 02 17:50:55 MDT 2024" +%s
I currently use the following in perl but it requires a lot of conversion. Hoping to find a simpler and more elegant solution.
$current_epoch = timelocal($seconds, $minute, $hour, $day_of_month, $month_num, $year)
I currently use Perl 5.8 ; I dont believe it has "Time::Piece"
I am only interested in solutions that do not require downloading another library