- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- date format option
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
тАО08-10-2010 10:19 PM
тАО08-10-2010 10:19 PM
According to it there is no format option +%s. However when I run this command:
/usr/bin/date +%s
I get a correct result:
1281507492
Why do you not include this format option in your documentation?
Solved! Go to Solution.
- Tags:
- date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2010 10:53 PM
тАО08-10-2010 10:53 PM
Re: date format option
yes you have right, there is no this entry in the manapage, but if you look into general man page ( Unix ) you will find this :
%s seconds since 1970-01-01 00:00:00 UTC
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2010 11:10 PM
тАО08-10-2010 11:10 PM
Re: date format option
The document you were reading is the first edition of HP-UX 11.11 man pages, published in December 2000. It's almost 10 years old.
I'm pretty sure this functionality didn't exist in 11.11 in about 2002/2003. I guess it may have been added by some patch after that. At that time, I wrote a tiny C program to overcome the problem.
Which version of HP-UX you're using? ("uname -a" please)
If the option exists but the installed manpage for date(1) on your system doesn't know about it, then it can be said it's a documentation bug.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2010 11:16 PM
тАО08-10-2010 11:16 PM
Re: date format option
I have taken a look at "HP-UX Reference" (2007) and the manpage on the server. Seems like +%s is not documented.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2010 11:31 PM
тАО08-10-2010 11:31 PM
Re: date format option
command referene, it is good that you found it, HP may include it in the next KB Knowledge base document,
http://docs.hp.com/en/B2355-91017/B2355-91017.pdf ## Page 205 (11.31)
---
date(1) date(1)
NAME
date - display or set the date and time
------
Cheers ,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2010 01:24 AM
тАО08-11-2010 01:24 AM
Re: date format option
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2010 02:15 PM
тАО08-11-2010 02:15 PM
Re: date format option
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2010 02:25 PM
тАО08-11-2010 02:25 PM
Re: date format option
> Bill: Based on some average 11.00, 11.11, 11.23 and 11.31 systems, date %s works starting with 11.23 and fails in anything prior.
And in that case, since all of the aforementioned releases had Perl, simply do:
# perl -le 'print time()'
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2010 10:18 PM
тАО08-11-2010 10:18 PM
Re: date format option
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2010 08:52 PM