Search Results for: Dates
gmtime functions, localtime and gmtime return an array: my $time = time; # or any other epoch timestamp my @months = ("jan","feb","mar","apr","may","jun", "jul","aug","sep","oct","nov","dec"); my ($sec, $min, $hour, $day,$month,$year) = (localtime($time))[ , , , , ]; # you can use 'gmtime' for gmt/utc dates
information on cpan: time::local , datetime . you can also use date::manip if you need more advanced date manipulation routines. using the date::parse module (thanks to ericblue ): use date::parse; print str time(" / / : am"); the perl cookbook, second edition gives detailed information on manipulating dates...
https://www.epochconverter.com/programming/perl