HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- HPUX Unix epoch time
Operating System - HP-UX
1834274
Members
2384
Online
110066
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2006 10:12 AM
01-22-2006 10:12 AM
Dear Sirs,
Why do we use Unix epoch time ? What are programs or processes on HPUX which uses this time ?
I had read about it long years ago but never understood the significance of this epoch time ?
I thought it is better to ask the opinion of Unix gurus of this forum.
Thanks,
Shiv
Why do we use Unix epoch time ? What are programs or processes on HPUX which uses this time ?
I had read about it long years ago but never understood the significance of this epoch time ?
I thought it is better to ask the opinion of Unix gurus of this forum.
Thanks,
Shiv
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2006 10:55 AM
01-22-2006 10:55 AM
Solution
Hi Shiv:
The "epoch" as far as UNIX is defines it is January 1, 1970 at 00:00:00 UTC. Time keeping in Unix counts in one-second intervals from the point.
32-bit systems can count only until January 19, 2938. Using negative times (before January 1, 1970) and positive values thereafter, we can reckon periods from Dec 13 20:45:52 1901 to Jan 19 03:14:07 2038.
The counting of seconds is done in UTC (Universal Time Zone Coordinates). What you and I perceive of as "time" is called "local" time and it the TZ (timesone) offset +- UTC or commonly Greenwich Mean Time (GMT).
Thus one-second after midnight on January 1, 1970 is really Wed Dec 31 19:00:01 1969 for me, in the US Eastern time zone since I'm 5-hours behind UTC (GMT). Regardless, all file and process timestamps record the number of seconds. You and I adjust for our local time.
Perl provides simple conversion methods for moving back and forth between epoch seconds and dates and time.
As I write, the current time is 1137973446 seconds since the epoch.
Given a number of seconds I can do:
# perl -le 'print scalar localtime(1137973446)'
...to get:
Sun Jan 22 18:44:06 2006
...which is my current (local timezone) time.
I can also use 'adb':
# echo 0d1137973446=Y | adb
Note the notation "0d" simply denotes decimal base.
Regards!
...JRF...
The "epoch" as far as UNIX is defines it is January 1, 1970 at 00:00:00 UTC. Time keeping in Unix counts in one-second intervals from the point.
32-bit systems can count only until January 19, 2938. Using negative times (before January 1, 1970) and positive values thereafter, we can reckon periods from Dec 13 20:45:52 1901 to Jan 19 03:14:07 2038.
The counting of seconds is done in UTC (Universal Time Zone Coordinates). What you and I perceive of as "time" is called "local" time and it the TZ (timesone) offset +- UTC or commonly Greenwich Mean Time (GMT).
Thus one-second after midnight on January 1, 1970 is really Wed Dec 31 19:00:01 1969 for me, in the US Eastern time zone since I'm 5-hours behind UTC (GMT). Regardless, all file and process timestamps record the number of seconds. You and I adjust for our local time.
Perl provides simple conversion methods for moving back and forth between epoch seconds and dates and time.
As I write, the current time is 1137973446 seconds since the epoch.
Given a number of seconds I can do:
# perl -le 'print scalar localtime(1137973446)'
...to get:
Sun Jan 22 18:44:06 2006
...which is my current (local timezone) time.
I can also use 'adb':
# echo 0d1137973446=Y | adb
Note the notation "0d" simply denotes decimal base.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2006 12:46 PM
01-22-2006 12:46 PM
Re: HPUX Unix epoch time
Essentially every UNIX program uses epoch seconds as the standard clock. It's simply the number of seconds since Jan 1, 1970 00:00:00 UTC not counting leap seconds. The reason is very simple. It allows everyone to be on a level playing field. It's very common for a UNIX box to have users connected from around the planet --- and possibly beyond. Each of might have different TZ settings which convert epoch seconds to local time. By using one standard, it is possible, for example, to compare file timestamps independent of the user's TZ setting or even independent of the host computer because all UNIX boxes tick off the same epoch seconds --- or at least they should.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2006 02:41 PM
01-22-2006 02:41 PM
Re: HPUX Unix epoch time
Hi Shiv,
Unix epoch time is known as "Unix time or POSIX time". There are two layers of encoding that make up Unix time, and they can be usefully separated. The first layer encodes a point in time as a scalar real number, and the second encodes that number as a sequence of bits or in some other manner.
More information at, http://en.wikipedia.org/wiki/Unix_epoch
-Arun
Unix epoch time is known as "Unix time or POSIX time". There are two layers of encoding that make up Unix time, and they can be usefully separated. The first layer encodes a point in time as a scalar real number, and the second encodes that number as a sequence of bits or in some other manner.
More information at, http://en.wikipedia.org/wiki/Unix_epoch
-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP