How do I convert a date/time to epoch time (aka unix time -- seconds since 1970) in Perl?
Posted
by dreeves
on Stack Overflow
See other posts from Stack Overflow
or by dreeves
Published on 2008-09-18T18:40:08Z
Indexed on
2010/03/24
22:23 UTC
Read the original article
Hit count: 402
Given a date/time as an array of (year, month, day, hour, minute, second), how would you convert it to epoch time, i.e., the number of seconds since 1970-01-01 00:00:00 GMT?
Bonus question: If given the date/time as a string, how would you first parse it into the (y,m,d,h,m,s) array?
© Stack Overflow or respective owner