Solved

Points for ozo

Posted on 1998-02-25
1
187 Views
Last Modified: 2013-12-16
thanks for your input into the "time" question
maudib
0
Comment
Question by:maudib031397
1 Comment
 
LVL 84

Accepted Solution

by:
ozo earned 150 total points
ID: 1812928
You're welcome.
I'm not sure if your question was completely answered,
If we consider 1971-11-03 to be the date of unix inception
http://www.de.freebsd.org/de/ftp/unix-stammbaum
Then you can find the local number of days since then with

use Time::Local;
$epoch=timelocal(0,0,0,3,11-1,1971-1900);
print int(((time)-$epoch)/86400);

#But to account for possible daylight savings time shifts,
#whether on the current day, the epoch day, or between,
#you may need something like:
$epochnoon=timelocal(0,0,12,3,11-1,1971-1900);
print int(((time+(12-(localtime)[2])*3600)-$epochnoon+43200)/86400)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

914 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

20 Experts available now in Live!

Get 1:1 Help Now