LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-12-2002, 03:36 PM   #1
esnagel
Newbie
 
Registered: May 2002
Posts: 2

Rep: Reputation: 0
Question strftime - 61 seconds?!?!?!?


Why does the man page for strftime indicate:

%S The second as a decimal number (range 00 to 61).

How can there be 61 seconds? Heck, how can there even be 60 seconds (wouldn't that just be 0 seconds, with another minute)?

How will this mess up my ftp logs?
 
Old 09-12-2002, 05:02 PM   #2
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 10,425

Rep: Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628
The extra 2 seconds are to account for leap seconds and the pretty rare double leap seconds. What is a leap second?
Quote:
Civil time is occasionally adjusted by one second increments to ensure that the difference between a uniform time scale defined by atomic clocks does not differ from the Earth's rotational time by more than 0.9 seconds. Coordinated Universal Time (UTC), an atomic time, is the basis for civil time.
--jeremy
 
Old 09-12-2002, 07:06 PM   #3
esnagel
Newbie
 
Registered: May 2002
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks! Luckily, php is pretty smart, so if I make the time using mktime, I can specify 61 seconds, and it'll add 1 minute and subtract the 60 seconds

Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert total no of seconds in the format hour minutes and seconds suchi_s Programming 15 03-15-2011 11:34 AM
get logged out every 5 seconds Avatar LQ Suggestions & Feedback 4 12-20-2005 10:13 AM
strftime(buffer,50,"%d/%m/%Y %H:%M:%S",loctime); alaios Programming 3 09-09-2005 06:26 AM
10 seconds in google? davidmelv Linux - Software 1 10-09-2004 09:39 AM
SECONDS per FRAME opensource Linux - General 4 02-01-2004 04:04 AM


All times are GMT -5. The time now is 06:38 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration