Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > Re: Date::Manip
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 11060 of 11531
Post > Topic >>

Re: Date::Manip

by reader@[EMAIL PROTECTED] May 12, 2008 at 07:21 PM

Rob Dixon <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");
 




 3 Posts in Topic:
Date::Manip
reader@[EMAIL PROTECTED]   2008-05-12 19:00:31 
Re: Date::Manip
rob.dixon@[EMAIL PROTECTE  2008-05-13 01:09:53 
Re: Date::Manip
reader@[EMAIL PROTECTED]   2008-05-12 19:21:44 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 19:16:14 CDT 2008.