Solved

Points for ozo

Posted on 1998-02-25
1
193 Views
Last Modified: 2013-12-16
thanks for your input into the "time" question
maudib
0
Comment
Question by:maudib031397
[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
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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

734 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