Solved

time command on NT server

Posted on 1998-08-12
9
140 Views
Last Modified: 2010-03-05
When I request the time

$t1 = time;
print $t1;
I get a number like  902976430
What does this mean?  It appears to be in seconds, but from where?
0
Comment
Question by:donb1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 5

Expert Comment

by:b2pi
ID: 1209248
try

perldoc -f time

Should be number of seconds since the first second of 1970 (I think that's the case on NT...)

You might rather deal with localtime or gmtime

0
 

Author Comment

by:donb1
ID: 1209249
That was not an answer to my question!
0
 
LVL 84

Expert Comment

by:ozo
ID: 1209250
#it sounded like an answer to me.
#Perhaps you should clarify your question.

print scalar gmtime 902976430;
#will tell you what it means

print scalar gmtime 0;
#will tell you where the count is starting from
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:Biffo
ID: 1209251
Why don't you just get the time from the $ENV, lot easier :)


0
 
LVL 2

Accepted Solution

by:
Biffo earned 50 total points
ID: 1209252
Anyways, to answer your question, your sample is returning
the number of non-leap seconds since 00:00:00.

Biffo
0
 

Author Comment

by:donb1
ID: 1209253
OK - what happens to the number in about 3 years when the number gets to a billion?  does it show up as 000000000 or 1000000000?  Is this another y2k +  bug?
0
 
LVL 84

Expert Comment

by:ozo
ID: 1209254
I'm not sure what makes Biffo's answer acceptable while b2pi's wansn't.
I must still not be understanding the question.

But to can see what happens in about 3 years
 print scalar localtime time+3.1*365*24*60*60;
0
 

Author Comment

by:donb1
ID: 1209255
I probably goofed in rejecting b2pi's answer.  His "I think" threw me off, I guess and also the rather answers.  His answer was OK, just my misunderstanding of it.  Guess there is no way to undo the thing.
0
 
LVL 5

Expert Comment

by:b2pi
ID: 1209256
I'm sure in the future I'll try to downplay my use of the English language.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question