Rob Dixon <[EMAIL PROTECTED]> writes: >> What is the right syntax? > > print $date = ParseDate("epoch 1210628919") . "\n";
Egad, and there is a big NOTE in perldoc Date::Manip about that very thing... thanks for you patience For anyone finding these posts with a search: (From perldoc Date::Manip) NOTE: One of the most frequently asked questions that I have gotten is how to parse seconds since the epoch. ParseDateString cannot simply parse a number as the seconds since the epoch (it conflicts with some ISO-8601 date formats). There are two ways to get this information. First, you can do the following: $secs = ... # seconds since Jan 1, 1970 00:00:00 GMT $date = DateCalc("Jan 1, 1970 00:00:00 GMT","+ $secs"); Second, you can call it directly as: $date = ParseDateString("epoch $secs"); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/