You can just use the function 'localtime' to get a human readable time stamp.
Code:
# localtime can take parameters to manipulate the format

$time = localtime;       # no args
print $time, "\n";  
# will output something like: Fri Feb  2 06:45:57 2001

## If you already have an epoch time you must convert do this

$time = localtime( $epoch );
# this will convert your epoch time to the same format in the previous example

************************************************************************************************************************

 

 

$time = localtime( $epoch );

How could I go from a 10 digit epoch time stamp to a parsed out human readable time varables

$sec,$min,$hour,$mday,$mon,$year

 

************************************************************************************************************************

 

try this :

Code:
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime( $epoch )
 

+ Recent posts