- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Precise date display
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
Forums
Discussions
Discussions
Discussions
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
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-2000 05:36 AM
08-10-2000 05:36 AM
I have found the system calls ftime and gettimeofday but as our developer is only able to use shells cripts he would like to use the date command, format using .prec doesnt seem to give the desired results
any help appreciated
Paul Gold
CAST systems
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2000 05:47 AM
08-10-2000 05:47 AM
Re: Precise date display
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2000 05:51 AM
08-10-2000 05:51 AM
Re: Precise date display
Why not, write him a program that uses gettimeofday, and outputs what he wants. Then he can just call it from a shell script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2000 05:52 AM
08-10-2000 05:52 AM
Re: Precise date display
Think you have to write a little C program for that.
Regards
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2000 06:24 AM
08-10-2000 06:24 AM
SolutionIt's raw, but will work from a script and I'm sure you could clean it up a bit. I'm sure he can cope with nanoseconds :-)
#include
#include
main()
{
struct timeval timenow;
struct timezone zonenow;
gettimeofday(&timenow, &zonenow);
printf("time %s",ctime(&timenow.tv_sec));
printf("nano %dn",timenow.tv_usec);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2000 07:02 AM
08-10-2000 07:02 AM
Re: Precise date display
Andy youre a star
Paul Gold
CAST systems