in reply to Re^2: Is there an official DST border day detection module?
in thread Is there an official DST border day detection module?

There's nothing preventing the users from entering times/dates in local times. Convert the entered times/dates to UTC (or, possibly to a "raw" time value), perform your logic, then convert back to local time.

I think that Date::Calc] will be very helpful to you.

  • Comment on Re^3: Is there an official DST border day detection module?

Replies are listed 'Best First'.
Re^4: Is there an official DST border day detection module?
by flowdy (Scribe) on Oct 28, 2014 at 19:59 UTC

    Hi RonW, I am already using Date::Calc heavily, as you can see in my code above containing calls to MkTime and Add_Delta_Days. :-)

    By local <=> UTC time conversion, I am afraid the DST switch issues would just bite me somewhere else. Somewhere in the system I just have to deal with the regular plus and minus DST hours affecting the user's actual schedule after all. Because knowing how long it effectively takes between point a and point b of time, from the users perspective, DST is a condition the software must handle instead of evening it out by UTC conversion. This is the price for having his planned private off time explicitly excluded from time-related calculations.

      On a random thought, I tried searching for "calendar" on CPAN. Looks like you could define rules in Date::Calendar::Profiles to determine the start/end dates of DST.