Solved

Points for ozo

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

744 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

12 Experts available now in Live!

Get 1:1 Help Now