Solved

Points for ozo

Posted on 1998-02-25
1
190 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

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…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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…

785 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