HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Three C programs for your pleasure - TimeStamp
Operating System - HP-UX
1833515
Members
3182
Online
110061
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
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
04-30-2004 03:53 AM
04-30-2004 03:53 AM
Three C programs for your pleasure - TimeStamp
I have noticed several threads referring to time manipulation such as adding or subtracting days or months from a date, getting the difference between two dates, etc. I have written 3 C programs that act as commands that perform these functions that Iâ d like to share with the forum. They have been compiled on HPUX 10.20, 11.00 and 11I as well as AIX 4.1 and 4.3, with one minor modification (documented in the code). Since they all use standard UNIX header files, these should also compile on other UNIX flavors.
Since I can only attach one file per thread, I will make three threads, one for each program.
This program is TimeStamp.
TimeStamp performs several different date conversions, depending on the options used.
TimeStamp issued without any arguments prints the timestamp of the current date.
TimeStamp â H
prints the command syntax and exits.
The general syntax of TimeStamp is:
TimeStamp [-B] [-R opt] [-J] [-j]
[-n] [-t timestamp]
[-d â date-stringâ ]
[-M mon] [-D day] [-Y year]
[-h hour] [-m minute] [-s second]
TimeStamp â S [year]
This form creates a Holiday Accounting file for the specified year (default is current year), if you are using HP's accounting routine.
Space limitations prevent me from giving an expanded syntax, so look at the help output or read the code.
Hope you find this as useful as I hav
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2004 04:03 AM
04-30-2004 04:03 AM
Re: Three C programs for your pleasure - TimeStamp
I would try those. Thanks for contribution to the forum.
Anil
Anil
There is no substitute to HARDWORK
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