Leap second happening

 
Thread Tools Search this Thread
Operating Systems Linux Fedora Leap second happening
# 1  
Old 06-28-2012
Leap second happening

Have anybody heard about the Leap second problem

Leap second :A leap second is a one-second adjustment that is occasionally applied to Coordinated Universal Time (UTC) in order to keep its time of day close to the mean solar time.

How could i avoid such thing in my script which i deal with times

source :Leap second - Wikipedia, the free encyclopedia
# 2  
Old 06-28-2012
What problem do you expect your script to run into because of a leap second? How does your script handle the leaps caused by daylight saving time?
Usually a leap second should not be a problem. Is the box you run your script on using ntpd or xntpd to synchronize time? If so you can configure it to synchronzie slowly. Have a look at ntpd.drift.

Last edited by cero; 07-02-2012 at 03:47 AM.. Reason: Typo
# 3  
Old 07-01-2012
My old HP-UX 11.11 server survived.

From /usr/adm/syslog/syslog.log:
Code:
Jul  1 01:00:01 unidev xntpd[1601]: leap second occurred, stepped time back 1 second

# 4  
Old 07-01-2012
Interesting - POSIX ignores leap seconds. I do not remember, but it looks like HPUX does not play POSIX. I left HPUX with v11.

Last edited by jim mcnamara; 07-01-2012 at 12:15 PM..
# 5  
Old 07-01-2012
I would not worry about it. You will notice that timekeeping structures like struct stat and struct tm (standard C, which is the basis of timekeeping in UNIX) are leap-second aware.

Leap seconds are kept by Linux. And shells there are compliant with it. This is true only if the box is connected to an ntp service. Tracking leap seconds is not required by POSIX, so your OS may not care. What OS do you have?

Unless you are doing precision time keeping like GPS, Realtime device monitoring, or Astronomy, it will NOT break what you are doing. Since you asked the question, I'm pretty sure you cannot be involved in something that would be affected in any way.
# 6  
Old 07-01-2012
Systems should be able to deal with it, although it seems that some Linux distributions had a problem with it.. If a system allows the leap second to be represented by hh:mm:60 then scripts and programming practices where the seconds range is defined as 0..59 can run into trouble...

Last edited by Scrutinizer; 07-01-2012 at 12:44 PM..
# 7  
Old 07-01-2012
Hi.

A few GNU/Linux seem to have produced a message about it:
Code:
Jun 30 18:59:59 (drl) kernel: [160267.112938] Clock: inserting leap second 23:59:60 UTC
Jun 30 18:59:59 vm-centos kernel: Clock: inserting leap second 23:59:60 UTC
(no messages from openSUSE 11.4)
(no messages from ubuntu 11.10)
(no messages from fedora 15)
(no messages from Solaris 10 10/08)
(no messages from FreeBSD, 8.0-RELEASE)
(no messages from Debian GNU/kFreeBSD 6.0)

cheers, drl
This User Gave Thanks to drl For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

Leap second for year 2015

I hear the Leap second for 2015 will occur on June 30 at 23:59:60 according to the wild rumours from internet the expected impact ranges from crashing to hanging servers. Can anybody share their preparations what they have done for solaris servers? are there any patches to install or workaround?... (1 Reply)
Discussion started by: sparcguy
1 Replies

2. Shell Programming and Scripting

unix korn shell leap years problem

Write a function called dateToDays that takes three parameters -a month string such as Sep, a day number such as 18, and a year number such as 1962-and return s the number of days from January 1, 1900, to the date. Notes: I am asking you to account for leap years. my script is not... (0 Replies)
Discussion started by: babuda0059
0 Replies

3. UNIX for Dummies Questions & Answers

Number of leap seconds

Is there a function call in std library or unit command that returns the number of current leap seconds? GG (4 Replies)
Discussion started by: NAVTime
4 Replies

4. UNIX for Dummies Questions & Answers

Leap year K-shell script

I need a k-shell script that tests for leap-year. Does anyone have one at hand, need ASAP!!! (2 Replies)
Discussion started by: p1jls02
2 Replies

5. UNIX for Advanced & Expert Users

leap seconds and the stdc library

I understand the NTP protocol, so keeping system time updated is not a problem. Standard C library routines like localtime() take a number of UTC seconds elapsed since the start of the epoch (Jan 1, 1970). These times in seconds can be a filetime, system time, or some other time in the past or... (1 Reply)
Discussion started by: jim mcnamara
1 Replies

6. HP-UX

Leap Second

Hi All, We are running the HP-UX 11.11 and Linux AS 3.0. so, shall we need to make any changes for leap second i.e. insert the leap second on 1st Jan 2006 or does the system have some setup which would take care of this automatically. Please advise. Regards, Inder (1 Reply)
Discussion started by: isingh786
1 Replies

7. UNIX for Advanced & Expert Users

Insertion of Leap Second

Hi All, We are running the HP-UX 11.11 and Linux AS 3.0. so, shall we need to make any changes for leap second i.e. insert the leap second on 1st Jan 2006 or does the system have some setup which would take care of this automatically. Please advise. Regards, Inder (2 Replies)
Discussion started by: isingh786
2 Replies

8. AIX

Ping is happening, telnet is not happening

HI all, Ping is happening to a AIX box...but telnet is not happening... AIX box doesn't have any conslole... Please help how to resolve it. Thanks in advance .. Manu (2 Replies)
Discussion started by: b_manu78
2 Replies
Login or Register to Ask a Question