Sponsored Content
Top Forums UNIX for Dummies Questions & Answers DST did not take effect on 3 Linux servers Post 302299850 by Perderabo on Saturday 21st of March 2009 05:46:28 PM
Old 03-21-2009
There is an internal system clock which is the number of seconds since the epoch and this does not get adjusted for DST. Is is right? Compare the output on a broken and working system of:
perl -e 'print time(), "\n" '

If both systems agree of the second but disagree on the representation, then one must not be patched properly or the systems are set to use different rules. That is controlled by /etc/localtime or maybe the TZ environment variable. Is that the same on both systems? Note that if your systems were up and running during the DST transition, the seconds as returned by that perl command would not suddenly change by one hour. What should change is that a different rule would now come into play about how to display the time in human readable form.

If the seconds on the internal system clock is off, then you need to look at how the system clock is set on both systems. This is the issue that your other source was probably thinking about. At boot time the system clock is initialized from the hardware clock that runs all the time via battery. You can keep in local time if you want, but it must be adjusted for DST. Linux can be set to read it and accept it. This works well when you have two OS's on the same box. Linux assumes the other OS set the clock. But for your hardware clock to cause a problem, you would need to reboot the server so it rereads the hardware clock. Or you would need to to be explicitly reading the hardware clock somehow. If linux is the only os on the box, the hardware clock really should be set to UTC (incorrectly aka GMT).

You could also be using NTP. Are you? If so, very early in the startup scripts you should get the time from an NTP server. Then the time on the hardware clock should irrelevant since it is quickly overwritten. In this case, you have an NTP problem somehow.

Be sure to read: https://www.unix.com/tips-tutorials/3...mekeeping.html

Doesn't redhat have a dateconfig (or maybe date-config) tool? If you have that, compare the settings on both systems. Otherwise check /etc/sysconfig/clock on both systems.
 

10 More Discussions You Might Find Interesting

1. Cybersecurity

Who uses Antivirus software on your linux servers?

So who uses antivirus software on your linux servers? A co-worker and myself have been debating on the need or lack there of for antivirus on a linux webserver running Apache even if that's the only service that may be running. He thinks no and I am of the opinion that it is needed. My rational... (1 Reply)
Discussion started by: jjvaas
1 Replies

2. UNIX for Dummies Questions & Answers

monitering servers in linux

how can i moniter the servers (e.g FTP, NNTP, APACHE) in linux. (4 Replies)
Discussion started by: perleo
4 Replies

3. Gentoo

What do you use on your linux servers?

What do you use on your linux servers? What distributions? (10 Replies)
Discussion started by: DCrystal
10 Replies

4. What is on Your Mind?

Microsoft servers Vs. Unix/Linux

What you have to say about the following comparison: Compare (2 Replies)
Discussion started by: tayyabq8
2 Replies

5. UNIX for Dummies Questions & Answers

Fax Servers for Linux/AIX

At the company where I work, use a product called VSI-FAX. It works nicely, but the maintenance has proven to be very poor grade. So, I'm interested in any experiences using other fax servers that run on Linux or AIX and what issues/gotchas were run into and overcome and how. I'm considering... (0 Replies)
Discussion started by: kpearson
0 Replies

6. Linux

Few Questions on about Linux Servers.

1.On x86 Machines ( Pentium4 ), What is the maximum number of Services( sshd, ntpd,named ,samba, etc.) that can be installed.? Is there a rule of thumb to attain the best possible performence.? 2. Is there a systematic way to boot a remote Machine.? 3. Are there any problems of having two... (2 Replies)
Discussion started by: kanata
2 Replies

7. UNIX for Dummies Questions & Answers

SSH into multiple linux servers

Hi All, Okay, I need help. I need to ssh in to multiple linux servers execute certain commands and get them to email and print on the screen when the script is being executed. So below is my script. Its not working :-(. #!/bin/bash #linux/UNIX box with ssh key based login... (7 Replies)
Discussion started by: xytiz
7 Replies

8. Linux

How to check CFG2HTML for Linux servers?

Hi, Could someone please let me know how to How to check CFG2HTML for Linux servers? I am new for OS end. Thanks, Vivek. (4 Replies)
Discussion started by: Viv_kadam
4 Replies

9. Shell Programming and Scripting

Script to locating Linux servers

All, Need an urgent help! , I have an simple text file that holding more than 500 IP Address, My requirement : bash script that will run from my central server , and will scan with nmap all the 500 ip address , for ssh port with . for example with the command : nmap -sT | grep '22.*open' ... (1 Reply)
Discussion started by: James Stone
1 Replies

10. Linux

How does Linux handle DST ( daylight saving time)?

Hello Can sombody please tell me how linux handles DST ( daylight saving time) ? Does the time change instantly , ex: if is is 3'o clock does linux instantly swich to 2'o clock ? plese give more info about this toppic (2 Replies)
Discussion started by: martonlorand
2 Replies
clocks(2)							System Calls Manual							 clocks(2)

NAME
clock_settime(), clock_gettime(), clock_getres() - clock operations SYNOPSIS
DESCRIPTION
clock_settime() The function sets the specified clock, to the value specified by Time values that are between two consecutive non-negative integer multi- ples of the resolution of the specified clock are truncated down to the smaller multiple of the resolution. clock_gettime() The function returns the current value for the specified clock, clock_getres() The resolution of any clock can be obtained by calling Clock resolutions are implementation defined and are not settable by a process. If the argument is not NULL, the resolution of the specified clock is stored into the location pointed to by If is NULL, the clock resolution is not returned. A clock may be system wide, that is, visible to all processes; or per-process, measuring time that is meaningful only within a process. The following clocks are supported: This clock represents the realtime clock for the system. For this clock, the values returned by and specified by represent the amount of time (in seconds and nanoseconds) since the Epoch. It is a system wide clock. The privilege is required to set this clock. Processes owned by the superuser have this privilege. 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. This clock represents the amount of time (in seconds and nanoseconds) that the calling process has spent executing code in the user's context. It is a per-process clock. It cannot be set by the user. This clock represents the amount of time (in seconds and nanoseconds) that the calling process has spent executing code in both the user's context and in the operating system on behalf of the calling process. It is a per-process clock. It cannot be set by the user. These clocks are high resolution hardware clocks present on HP-RT realtime systems. It is included here so that applications accessing this hardware can be compiled on HP-UX systems and then ported to an HP-RT target. HP-UX does not support or RETURN VALUE
A return of zero indicates that the call succeeded. A return value of -1 indicates that an error occurred, and is set to indicate the error. ERRORS
If any of the following conditions occur, the and functions return -1 and set (see errno(2)) to the corresponding value: The functions and are not supported by this implementation. The argument does not specify a known clock. The argument to is outside the range for the given The argument specified a nanosecond value less than zero or greater than or equal to 1000 million. The requesting process does not have the necessary privileges to set the specified clock. The or argument points to an invalid address. EXAMPLES
Advance the system wide realtime clock approximately one hour: Get the resolution of the user profiling clock: AUTHOR
and were derived from the proposed IEEE POSIX P1003.4 Standard, Draft 14. SEE ALSO
timers(2), privileges(5). STANDARDS CONFORMANCE
clocks(2)
All times are GMT -4. The time now is 01:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy