stime(2) System Calls Manual stime(2)NAME
stime() - set time and date
SYNOPSIS DESCRIPTION
The system call sets the system time and date. tp points to the value of time as measured in seconds from 00:00:00 on January 1, 1970,
Coordinated Universal Time (UTC).
Security Restrictions
Some or all of the actions associated with this system call require the privilege. Processes owned by the superuser will have this privi-
lege. Processes owned by other users may have this privilege, depending on system configuration. See privileges(5) for more information
about privileged access on systems that support fine-grained privileges.
RETURN VALUE
returns the following values:
Successful completion.
Failure.
is set to indicate the error.
ERRORS
If fails, is set to one of the following values.
The calling process does not have the
privilege.
The parameter points to an invalid (negative) time value.
The parameter is an invalid address.
SEE ALSO date(1), gettimeofday(2), time(2), privileges(5).
STANDARDS CONFORMANCE stime(2)
Check Out this Related Man Page
setauduser(3) Library Functions Manual setauduser(3)NAME
setauduser - start auditing the current process as owned by a given user
SYNOPSIS DESCRIPTION
sets which uniquely identifies the user for the current process. The user argument points to the name of the login user associated with
the current process, and must not exceed the longest user name that HP-UX supports. can be used to dynamically get the longest user name
that HP-UX supports.
The stime argument points to time of authentication in the format YYYYMMDDhhmm, Coordinated Universal Time (UTC). If stime is a null
pointer, the UTC of the current time is used.
Programs using this routine must be compiled with
Security Restrictions
This call requires the user to be superuser or to possess the privilege. See privileges(5) for details.
RETURN VALUE
returns the following values:
n Successful completion. n is the length of accepted by the kernel.
Failure.
is set to indicate the error.
ERRORS
If fails, is set to one of the following values:
user is NULL, or the length of user exceeds the longest user name that HP-UX supports.
The length of stime is not equal to bytes. See
The caller is not a superuser or a privileged process.
AUTHOR
was developed by HP.
SEE ALSO getaudid(2), setaudid(2), sysconf(2), getauduser(3), audit(5), privileges(5).
setauduser(3)
Hello all,
I wish to set the time and date of the system from my application. (I write code in C ).
How can it be done?
I found the function stime() - but it gets time in seconds as a parameter, and I don't know how to convert my time & date to seconds since EPOCH.
What's the best... (0 Replies)
Hello Everyone,
I have been trying to complete a shell script where, I need to increment the date depending on the file (depending on the date) availability on the remote server.
i.e.
Basically, I will be passing a counter (like parameter 1 or 2 or 3 or 4).
First I will check for the... (1 Reply)
Hi all,
how to get the same time in two systems,
for example:
in one system i have the correct time, and second system i have wrong time.
now i want the first sytem to second sytem, i dont to want to do this work manually.
i know there is one command to get the time. in ntp.
... (3 Replies)
Frineds I need assistance in writing a script . Newbie to scripting.
How to find list of processes that are running more than an hour . Below i used the step to get the etime and stime . Now by getting the result i need to display longer time process with full listing.
ps -aef -o... (10 Replies)
Hi! All,
I am trying to reset the date and time since the change in time over the weekend. I cannot issue the command date -t 201703131330.
The system gives me an error invalid option.
This happens on my SCO OpenServer 5.0.7 and 5.0.6. Do anyone have an idea why? I even tried using... (6 Replies)