Solved

time command on NT server

Posted on 1998-08-12
9
122 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
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 5

Expert Comment

by:b2pi
Comment Utility
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
Comment Utility
That was not an answer to my question!
0
 
LVL 84

Expert Comment

by:ozo
Comment Utility
#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
 
LVL 2

Expert Comment

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


0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 2

Accepted Solution

by:
Biffo earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
I'm sure in the future I'll try to downplay my use of the English language.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now