HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Three C programs for your pleasure - Ctime
Operating System - HP-UX
1837968
Members
2994
Online
110124
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
05-03-2004 02:16 AM
05-03-2004 02:16 AM
Three C programs for your pleasure - Ctime
I had posted this on Friday, but it went away (I hope I am not breaking any rules, here, but they are my programs to give away if I want)
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 Ctime and will add/subtract Years, Months, Weeks, Days, Hours, Minutes and/or Seconds from any date (default is current date). For example:
Ctime -2 Months
will display the date two months ago. It is very convenient and useful for some specific purposes.
I noticed that my other two postings had many wierd characters, probably because I tried to cut/paste from a word document, so I won't both doing that again here.
Space limitations prevent me from giving an expanded syntax, so look at the help output or read the code. Ctime -h display the full command syntax.
Hope you find this as useful as I have.
Enjoy!
j
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 Ctime and will add/subtract Years, Months, Weeks, Days, Hours, Minutes and/or Seconds from any date (default is current date). For example:
Ctime -2 Months
will display the date two months ago. It is very convenient and useful for some specific purposes.
I noticed that my other two postings had many wierd characters, probably because I tried to cut/paste from a word document, so I won't both doing that again here.
Space limitations prevent me from giving an expanded syntax, so look at the help output or read the code. Ctime -h display the full command syntax.
Hope you find this as useful as I have.
Enjoy!
j
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2004 02:22 AM
05-03-2004 02:22 AM
Re: Three C programs for your pleasure - Ctime
Hi Joel,
You can post scripts utilities in this thread.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=178514
Regards and good luck,
Robert-Jan
You can post scripts utilities in this thread.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=178514
Regards and good luck,
Robert-Jan
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