Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Leap second coming up. Check your date handling code

by perldigious (Priest)
on Dec 27, 2016 at 14:50 UTC ( [id://1178529]=note: print w/replies, xml ) Need Help??


in reply to Leap second coming up. Check your date handling code

Y2.01700000003171K... Very roughly rounded of course... In fact so roughly rounded that using that exact decimal year value for a second it would lead to over 3 minutes of time slip each year.

Does anybody else wish we didn't have such an odd time keeping system and instead had something more base 10 like for everything? Not that the Earth's rotation still wouldn't slow and that we wouldn't have to adjust, just something I often wish was true similar to what I wish anytime I have to work in English units (American Exceptionalism indeed). Why couldn't God have created the world in 10 days and spent every other day resting, or maybe just been a prolific procrastinator? I tell you it's like the workaholics in the office that make everybody else look bad for having a life outside of work. :-)

On a tangentially related note, thanks to Christmas Eve and Christmas both falling on Saturday and Sunday my company gave all us salaried folk one less paid holiday off day this year than is typical. That just makes me feel like spending an entire day posting unproductive stuff like this on PerlMonks, but I'm obviously not one of those workaholics, though I admit I used to be at the beginning of my career before I came to the sad realization that being Boxer from Animal Farm isn't who I wanted to be (so much unpaid overtime I'm never getting back, sigh).

Just another Perl hooker - Yes, I'll do really dirty code, but I charge extra.
  • Comment on Re: Leap second coming up. Check your date handling code

Replies are listed 'Best First'.
Re^2: Leap second coming up. Check your date handling code
by FreeBeerReekingMonk (Deacon) on Dec 28, 2016 at 19:42 UTC
    60 can be divided by 1, 2, 3, 4, 5, 6 and 10. Because of this, you can avoid many fractions.

    perl -E 'for $i (1..10){say "60/$i=".(60/$i)}'

    Same goes for 360 perl -E 'for $i (1..360){say "360/$i=".($_=360/$i)unless(($_=360/$i)-int($_))}'

    Now, base 10 time is not a new concept: metric time. It does take some time to get used to, though. (but at least you will not be ruled by Babylonian time anymore)

    Speaking of Integers: I feel bad for you, son. I got .99999999 problems, and a float ain't one......

      Huh, I learned something today. Kudos, and despite the handy even division by the first 6 natural numbers, metric time still sounds pretty appealing to me if we had jumped on it a lot sooner in human history (pre-industrial revolution would have been nice). Our current physical measurement definitions for so many units being based on seconds having to be changed would be a massive shock to the system Système Internationale. I don't mind floats, but I don't want to get in to a pointed argument... :-)

      Mmm, delicious nostalgia.

      Just another Perl hooker - Yes, I'll do really dirty code, but I charge extra.
        Yes, But isn't it nice that 24 hours are actually made up of three 8 hour blocks. (and 8 is... well, a digital number, like 8 bits). And so you have 1/3 sleep, 1/3 work and 1/3 leisure time? ( where sleeping is false, working is true, and leisure is undef )

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1178529]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-19 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found