Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: Interpolating subroutine call in SQL INSERT INTO SELECT statement

by chacham (Prior)
on Aug 27, 2015 at 17:01 UTC ( #1140234=note: print w/replies, xml ) Need Help??


in reply to Re^3: Interpolating subroutine call in SQL INSERT INTO SELECT statement
in thread Interpolating subroutine call in SQL INSERT INTO SELECT statement

Even a broken clock is right once every 86400 seconds.

I appreciate your attempt to paraphrase Lewis Carroll's "The Two Clocks". Though, i see attribution to Marie von Ebner-Eschenbach as well.

The idea is, it is correct twice every day, assuming a 12-hour clock. However, due to the leap second a "day" might take 86,401 seconds. Therefore, while correct twice a day, it may only be once in any given 86,400 seconds.

  • Comment on Re^4: Interpolating subroutine call in SQL INSERT INTO SELECT statement

Replies are listed 'Best First'.
Re^5: Interpolating subroutine call in SQL INSERT INTO SELECT statement
by 1nickt (Abbot) on Aug 28, 2015 at 06:33 UTC

    I use the 24-hour clock on my wristwatch and all my clocks ... now do you, as a Perl programmer, know off the top of your head how many seconds are in 12 hours? Probably not, because it is a useless unit! But I bet you knew 86400 seconds in a day :-)

    As for leap seconds; ugh.

    perl -MDateTime -E' say DateTime->new(time_zone=>"UTC",year=>1972,month=>12,day=>31,hour=> +23,minute=>59,second=>60)->add(months=>$_)->month_name for (0,1); ' December February
    ... we escaped this year because July is longer than June (hmm, I wonder if that's why they moved it to June?):
    perl -MDateTime -E' say DateTime->new(time_zone=>"UTC",year=>2015,month=>6,day=>30,hour=>2 +3,minute=>59,second=>60)->add(months=>$_)->month_name for (0,1); ' June July


    The way forward always starts with a minimal test.

      I use the 24-hour clock on my wristwatch and all my clocks

      That looks really confusing. Is it easy to switch?

        You're right; it does take some working out. Maybe I'll switch to the Happy Hour Timepieces "Ish" and keep things simple.


        The way forward always starts with a minimal test.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2019-07-22 20:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?






    Results (21 votes). Check out past polls.

    Notices?