Sponsored Content
Full Discussion: change time
Operating Systems Linux Debian change time Post 302591567 by jim mcnamara on Friday 20th of January 2012 12:00:32 AM
Old 01-20-2012
Time settings for the current process? Or system-wide?

PS: system-wide requires a reboot.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Time change not working...

Hi, I am pretty new to the Solaris world. Just installed the version 8 and found that the time is off. I am in the Central time zone. In the beginning, the date and time was off by a day. After changing the /etc/default/init, there is no avail. The date is now correct but the time is still 5 hours... (7 Replies)
Discussion started by: conflansun
7 Replies

2. UNIX Desktop Questions & Answers

Change time source?

I need to change the time on my SUN box, it is five minutes fast. (4 Replies)
Discussion started by: michelemcdonald
4 Replies

3. UNIX for Dummies Questions & Answers

How to change time as root?

Hi, Can someone tell me how to change time inside red hat linux machine as root? ThanX! (1 Reply)
Discussion started by: whatisthis
1 Replies

4. Linux

How To change time?

what command must i use to change time ? (4 Replies)
Discussion started by: Sirius
4 Replies

5. UNIX for Dummies Questions & Answers

Change the time in AIX

I have already updated the DST change but my system time is about 10 minutes off. How do i set the time in the AIX 5.3? Thanks Dave (1 Reply)
Discussion started by: rocker40
1 Replies

6. Solaris

change time

The time of our Solaris server now is slowly more 20 seconds. How can we change it ? (3 Replies)
Discussion started by: anhtt
3 Replies

7. AIX

How to change time on servers

Hi all We are currently using AIX 5.3, we reuquire to change the time according to the daylight saving scenario. We are using the internal clock and are not synced with ntp server. Can any one please tell me how to do that without effecting the processes running on the servers? (2 Replies)
Discussion started by: masquerer
2 Replies

8. Shell Programming and Scripting

how to change time hr:mm to mm:hr in perl

Hi I want to match time hr:mm and change to mm:hr please let me know how to do that in perl (2 Replies)
Discussion started by: lakshmikant
2 Replies

9. AIX

AIX TIME CHANGE

Hi Guys , I see a weird problem with one of the AIX Machine, The time is changing randomly on the server. The seconds part of the time is what is the problem which is jumping on a uneven order and coming back to the original state after some time and again the same.. I have collected the time... (8 Replies)
Discussion started by: kkeng808
8 Replies
setclock(3)						     Library Functions Manual						       setclock(3)

NAME
setclock - Sets value of system-wide clock LIBRARY
Standard C Library (libc.a) SYNOPSIS
#include <sys/timers.h> int setclock( int clktyp, struct timespec *val) ; PARAMETERS
Specifies a system-wide clock whose symbolic name must be TIMEOFDAY. Points to the location where the value of the time to set into the clock specified by the clktyp parameter is stored. DESCRIPTION
The setclock() function sets a time value into the system-wide clock whose symbolic name is specified by the clktyp parameter, which must be TIMEOFDAY, defined in the sys/timers.h header file. The source of the current value of time set into the system-wide time-of-day clock by this function is stored in space reserved by a type timespec structure pointed to by the val parameter. This time information is the amount of time since the epoch. The epoch is referenced to 00:00:00 GMT (Greenwich Mean Time) 1 Jan 1970. The timespec structure, which is also defined in the sys/timers.h header file has the fol- lowing members: unsigned long tv_sec Time of day since the epoch in seconds. long tv_nsec Time of day fraction of a second (expressed in nanoseconds). NOTES
Trial use RETURN VALUES
Upon successful completion, the setclock() function returns a value of 0 (zero). Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS
If the setclock() function fails, errno may be set to one of the following values: The clktyp parameter does not specify a known system- wide clock, the information pointed to by the val parameter is outside the permissible range for the clock specified by the clktyp parame- ter, or a nanosecond value less than zero or greater than or equal to 1000 million is specified by the information pointed to by the val parameter. An error occurred while accessing the clock specified by the clktyp parameter. The requesting process does not have the appro- priate privilege to set the clock specified by the clktyp parameter. RELATED INFORMATION
Functions: getclock(3), gettimer(3), time(3) delim off setclock(3)
All times are GMT -4. The time now is 03:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy