in reply to working with time ranges that cross days

Work harder :-)

The localtime function is what you look for.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
  • Comment on Re: working with time ranges that cross days

Replies are listed 'Best First'.
Re^2: working with time ranges that cross days
by caelifer (Scribe) on Jan 31, 2007 at 16:39 UTC
    FWIW, just want to elaborate on and correct the above tip a bit. Basically, it suggested to convert your Date/Time representation of both ends of your range to unix time (number of seconds since the Epoch). This will give you two integers, each uniquely identifying point in time, to work with. To achieve this you should NOT use localtime as suggested but a core module Time::Local and its timelocal function.

    BR

      Your reply must have been aimed at another node.
      I didn't suggest any conversion whatsoever.

      --shmem

      _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                    /\_¯/(q    /
      ----------------------------  \__(m.====·.(_("always off the crowd"))."·
      ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
A reply falls below the community's threshold of quality. You may see it by logging in.