- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Date in seconds ??
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
Forums
Discussions
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
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
10-11-2000 02:05 AM
10-11-2000 02:05 AM
Date in seconds ??
dose anyone know how to visualize the actual date of the system in seconds?
Thanks
By
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2000 02:10 AM
10-11-2000 02:10 AM
Re: Date in seconds ??
You can do it with the following C program:-
#include
#include
main(argc,argv)
int argc;
char *argv[];
{
struct tm timeinfo;
printf("%dn",time(NULL));
exit(0);
}
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2000 02:15 AM
10-11-2000 02:15 AM
Re: Date in seconds ??
#include
#include
main(argc,argv)
int argc;
char *argv[];
{
printf("%dn",time(NULL));
exit(0);
}
This prints out the current system time in 'seconds since the epoch', see 'man 2 time' for details.
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2000 10:00 AM
10-12-2000 10:00 AM
Re: Date in seconds ??
the easiest way from the shell is to create
an at-job to be started in 1 minute, the
name of the job is the amount of seconds
from 1.1.1970 to the start-time of the job.
HTH,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2000 05:48 PM
10-12-2000 05:48 PM
Re: Date in seconds ??
perl -e '$time = time ; print "$time n"'
This returns the system time in seconds (no. of seconds since 1/1/1970)