- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- converting seconds since 1980 to current date
Operating System - HP-UX
1823858
Members
4298
Online
109666
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
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
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
тАО09-06-2007 11:57 PM
тАО09-06-2007 11:57 PM
Hi, I have a database with dates in "HP/Apollo seconds since 1980." How can I convert this (under Windows) to date/time, with leap years, days, seconds etc. considered?
Thanks MUCH in advance for help.
Carolyn
Thanks MUCH in advance for help.
Carolyn
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2007 12:08 AM
тАО09-07-2007 12:08 AM
Solution
Perl can readily solve this on Windows and Unix alike. Just figure out 'since 1980' once, and then add that as base to any Apollo date.
Base:
$ perl -e 'use Time::Local; print timelocal(0,0,0,1,0,1980) '
315550800
Use:
$ perl -e 'print scalar localtime(315550800 + 3650)'
Tue Jan 1 01:00:50 1980
$ perl -e 'print scalar localtime(315550800 + 403650)'
Sat Jan 5 16:07:30 1980
Check out the perl documenation to see how to get the components of such new time:
http://perldoc.perl.org/functions/localtime.html
Hope this helps some,
Hein van den Heuvel (at gmail dot com)
HvdH Performance Consulting
Base:
$ perl -e 'use Time::Local; print timelocal(0,0,0,1,0,1980) '
315550800
Use:
$ perl -e 'print scalar localtime(315550800 + 3650)'
Tue Jan 1 01:00:50 1980
$ perl -e 'print scalar localtime(315550800 + 403650)'
Sat Jan 5 16:07:30 1980
Check out the perl documenation to see how to get the components of such new time:
http://perldoc.perl.org/functions/localtime.html
Hope this helps some,
Hein van den Heuvel (at gmail dot com)
HvdH Performance Consulting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2007 12:20 AM
тАО09-07-2007 12:20 AM
Re: converting seconds since 1980 to current date
Shalom,
Great scripts for figuring things like this out.
http://hpux.ws/merijn/caljd-2.25.sh
http://hpux.ws/merijn/caljd-2.2.pl
I use these as production scripts. Written by A. Clay Stephenson
SEP
Great scripts for figuring things like this out.
http://hpux.ws/merijn/caljd-2.25.sh
http://hpux.ws/merijn/caljd-2.2.pl
I use these as production scripts. Written by A. Clay Stephenson
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2007 02:09 AM
тАО09-07-2007 02:09 AM
Re: converting seconds since 1980 to current date
Thanks guys! I needed the hint about Julian dates. I got the date for 1/1/1980 using the script cal_jdate(). When added to our 'date' value & converted back to gregorian, it works beautifully. (Poor documentation on top of all else -- the doc says seconds since 1980, but its clearly not.)
Thanks again!
Carolyn
Thanks again!
Carolyn
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
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP