Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Display tide based on time now.

by Anonymous Monk
on Mar 28, 2013 at 13:07 UTC ( #1025961=note: print w/ replies, xml ) Need Help??


in reply to Re: Display tide based on time now.
in thread Display tide based on time now.

Yes it is close, but this is how your code stands:

First tide time on 2013/03/27 - 12:21 AM - The current time has to be 12:22 AM to work.
Last tide time on 2013/03/27 - 06:39 PM - The current time can not be over that.

It only works OK if its one minute after the time of the first tide time and not over the time of the last tide time.

Thanks for trying!


Comment on Re^2: Display tide based on time now.
Re^3: Display tide based on time now.
by Krambambuli (Deacon) on Mar 28, 2013 at 14:33 UTC
    Check the updated code, if you wish. It should display something for whatever 'now' time.
      That's great, I just corrected I little thing here:
      my @tides = ( { time_in_seconds => 0, highlow => 'Unknown', # it was high_low time => 'Unknown', } );
      But thanks for your help. I have to do more work on that to check the dates for the next available tide and avoid printing 'Unknown'. This XML has the dates for the whole year, but this pointed me in the right direction for sure!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2014-10-25 00:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (138 votes), past polls