Do you know where your variables are? PerlMonks

### Re^4: Logical ways to calculate being within two times (leaps)

by BrowserUk (Patriarch)
 on Nov 28, 2016 at 21:37 UTC ( #1176741=note: print w/replies, xml ) Need Help??

My experience says that leap seconds do not impact epoch time ... And, when you think about it, they can't.

You missed the point. I was not describing a problem with epoch times per se; but rather my method of deriving them.

The loop relies upon hitting every minute so as to ensure it will terminate. When the required minute is reached.

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.
• Comment on Re^4: Logical ways to calculate being within two times (leaps)

Replies are listed 'Best First'.
Re^5: Logical ways to calculate being within two times (leaps)
by tye (Sage) on Nov 28, 2016 at 21:43 UTC

The code hits each minute by adding 60 to epoch time values. So a leap second can't cause that code to miss a particular minute. Had the code done something like sleep(60), then a negative leap second or even just a bit of the system being busy could trip it up.

- tye

A negative leap second would suppress second 23:59:59 of the last day of a chosen month, so that second 23:59:58 of that date would be followed immediately by second 00:00:00 of the following date

Therefore, there is the possibility of a 59 second minute. Ergo, the loop could step over an entire minute and, if the timing of the running of the loop was right, never terminate.

No matter how slim the possibility, it exists.

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.

Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1176741]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (1)
As of 2022-11-27 14:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
My favourite new Perl feature (in 2022) ...

Results (40 votes). Check out past polls.

Notices?