in reply to Trouble with time zones and Sun rise/set

Hi GrandFather,

Perhaps the module has an embedded April Fools Day prank ?
;-))

Cheers,
Rob
  • Comment on Re: Trouble with time zones and Sun rise/set

Replies are listed 'Best First'.
Re^2: Trouble with time zones and Sun rise/set
by GrandFather (Saint) on Apr 19, 2022 at 02:46 UTC

    Alas, it's not that simple. If I change the date to the 2nd I get:

    Rise: 2022-04-02T18:35:20 Set: 2022-04-02T06:10:25 (Pacific/Auckland +)

    which is altogether consistent with the Sun rising a little later each day as we head into winter assuming the reported time is UTC and we are in the Southern Hemisphere.

    Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
      Another odd thing I've just noticed is that you're "expected" result has sunset being significantly more than 12 hours after sunrise - yet April comes along after the March (autumn) equinox.

      Cheers,
      Rob

        That's easy: I was being lazy and dumb - I swapped the times instead of converting from UTC to NZDT! I'll leave it like that in the OP as a lesson in when not to be lazy (only particularly eagle eyed monks will notice in any case).

        Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
        I read this 10 times to make sense of it, till I realized that in the southern hemisphere winter is coming. 🤦

        (euro-centric, pre-coffinated me :)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery