Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Leap seconds don't impact epoch time calculations. So I'd like to see how you, in theory, get a value of '60' for the seconds that you want to pass to something like you've shown. Code that wants to know how many seconds past the start of the current minute is first going to get 'now' as a single number of epoch seconds and then use that to ask for a list of numbers including that number of seconds past the start of the minute. Such code will never have to deal with that last number being 60.

So, for those complaining about the sloppy way that some have chosen to deal with leap seconds of smearing the 1-second jump in are being silly. Because if you don't do that, all that happens in that the 1-second jump happens more sloppily. That is, if you don't smear the leap second out, then you get the exact same value for the epoch seconds for a duration of 2 seconds! Things get worse if you ask for a high-resolution real-time clock value, likely involving your epoch seconds moving backward in time.

- tye        


In reply to Re: Leap second coming up. Check your date handling code (bad theory) by tye
in thread Leap second coming up. Check your date handling code by 1nickt

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-03-28 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found