Sponsored Content
Operating Systems SCO Changing date time will cause the X11 restart Post 302935437 by DGPickett on Monday 16th of February 2015 03:53:49 PM
Old 02-16-2015
Sudden adjustments in the clock mean that timers can instantly expire invalidly. Some time adjustment programs move the time gradually to the desired time so there is no disruption. In this internet age, most of us have internet sync'd or local time master sync'd clocks, and the clock adjustment with these seems to always be gentle. One wonders why the time needs much setting, but even a host with a pretty bad clock can be kept in sync with NTP or the like.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Changing Creation Date to a Prespecified Date of a File In Unix

Dear Expert, Is there a command to do that in Unix? In such a way that we don't need to actually "write" or modified the content. -- monkfan (4 Replies)
Discussion started by: monkfan
4 Replies

2. Shell Programming and Scripting

Convert Epoch Time to Standard Date and Time & Vice Versa

Hi guys, I know that this topic has been discuss numerous times, and I have search the net and this forum for it. However, non able to address the problem I faced so far. I am on Solaris Platform and unable to install additional packages like the GNU date and gawk to make use of their... (5 Replies)
Discussion started by: DrivesMeCrazy
5 Replies

3. UNIX for Advanced & Expert Users

Changing Time and date on Virtual server

Hello Everyone I am running a Sunos 5.10 Generic_138888-02 sun4u sparc SUNW,SPARC-Enterprise machine with more than one virtual servers are on this box. My question is possable to change the date and time on the virtual server without change the time on the main server? Thanks Peter (4 Replies)
Discussion started by: Peterh
4 Replies

4. UNIX for Dummies Questions & Answers

Converting string date time to unix time in AWK

I'd like to convert a date string in the form of sun aug 19 09:03:10 EDT 2012, to unixtime timestamp using awk. I tried This is how each line of the file looks like, different date and time in this format Sun Aug 19 08:33:45 EDT 2012, user1(108.6.217.236) all: test on the 17th ... (2 Replies)
Discussion started by: bkkid
2 Replies

5. Solaris

modifying date and time and time zone on solaris 5.10 with (redundant server) veritas

I have a cluster of two Solaris server (veritas cluster). one working and the other is standby I am going to change the date on them , and am looking for a secure solution as it is giving an important service. my opinion is that the active one doesn't need to be restarted (if I don't change the... (1 Reply)
Discussion started by: barry1946
1 Replies

6. Shell Programming and Scripting

Adding time to date time in UNIX shell scipting

I needed some help in adding a duration (in seconds) to a start time (in hhmmss format) and a start date (in mmddyy format) in order to get an end date and end time. The concept of a leap year is also to be considered while incrementing the day. The code/ function that I have formed so far is as... (3 Replies)
Discussion started by: codehelp04
3 Replies

7. Shell Programming and Scripting

Displaying current date time of EDT in IST time

Hi Folks, My server time is in EDT. And i am sending automated mails from that server in which i need to display the current date time as per IST (GMT+5:30). Please advice how to display the date time as per IST. IST time leads 9:30 mins to EDT. and i wrote something like below. ... (6 Replies)
Discussion started by: Showdown
6 Replies

8. Red Hat

Touch - changing date and time

Hi, I am facing a problem with the command - TOUCH on Linux. See the example below: File on Linux: rw-rw-r-- user1 user1 Jan 01 09:00 test.txt The file - test.txt was created by the user - user1. Now, I want to change the date and time, but using other user - user2 The user2... (12 Replies)
Discussion started by: brjohnsmith
12 Replies

9. Red Hat

NTPD service restart and time synch

I am using ntpd service to sync our RHEL 5.9 system to synch with GPS clock. When I change the RHEL system time more than 7 seconds than the present system time (through "Datetime" command), ntpd service does not adjust the system time to the present GPS time.But if the time is with in 7 seconds,... (6 Replies)
Discussion started by: Anjan Ganguly
6 Replies

10. UNIX for Beginners Questions & Answers

Changing CSV files with date . Subtracting date by values

Hi All, I have a CSV file which is as below. Basically I need to take the year column in it and find if the year is >= 20152 . If that is then I should subtract all values by 6. In the below example in description I am having number mentioned as YYWW so I need to subtract those by -5. Whereever... (8 Replies)
Discussion started by: arunkumar_mca
8 Replies
ADJTIME(3)						     Linux Programmer's Manual							ADJTIME(3)

NAME
adjtime - correct the time to synchronize the system clock SYNOPSIS
int adjtime(const struct timeval *delta, struct timeval *olddelta); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): adjtime(): _BSD_SOURCE DESCRIPTION
The adjtime() function gradually adjusts the system clock (as returned by gettimeofday(2)). The amount of time by which the clock is to be adjusted is specified in the structure pointed to by delta. This structure has the following form: struct timeval { time_t tv_sec; /* seconds */ suseconds_t tv_usec; /* microseconds */ }; If the adjustment in delta is positive, then the system clock is speeded up by some small percentage (i.e., by adding a small amount of time to the clock value in each second) until the adjustment has been completed. If the adjustment in delta is negative, then the clock is slowed down in a similar fashion. If a clock adjustment from an earlier adjtime() call is already in progress at the time of a later adjtime() call, and delta is not NULL for the later call, then the earlier adjustment is stopped, but any already completed part of that adjustment is not undone. If olddelta is not NULL, then the buffer that it points to is used to return the amount of time remaining from any previous adjustment that has not yet been completed. RETURN VALUE
On success, adjtime() returns 0. On failure, -1 is returned, and errno is set to indicate the error. ERRORS
EINVAL The adjustment in delta is outside the permitted range. EPERM The caller does not have sufficient privilege to adjust the time. Under Linux the CAP_SYS_TIME capability is required. CONFORMING TO
4.3BSD, System V. NOTES
The adjustment that adjtime() makes to the clock is carried out in such a manner that the clock is always monotonically increasing. Using adjtime() to adjust the time prevents the problems that can be caused for certain applications (e.g., make(1)) by abrupt positive or nega- tive jumps in the system time. adjtime() is intended to be used to make small adjustments to the system time. Most systems impose a limit on the adjustment that can be specified in delta. In the glibc implementation, delta must be less than or equal to (INT_MAX / 1000000 - 2) and greater than or equal to (INT_MIN / 1000000 + 2) (respectively 2145 and -2145 seconds on i386). BUGS
A longstanding bug meant that if delta was specified as NULL, no valid information about the outstanding clock adjustment was returned in olddelta. (In this circumstance, adjtime() should return the outstanding clock adjustment, without changing it.) This bug is fixed on systems with glibc 2.8 or later and Linux kernel 2.6.26 or later. SEE ALSO
adjtimex(2), gettimeofday(2), time(7) COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2008-06-22 ADJTIME(3)
All times are GMT -4. The time now is 09:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy