#1 Daylight savings time not accounted for

closed-wont-fix
None
1
2005-06-05
2004-06-25
Aaron Stone
No

This function in calc.cpp is incorrect. Daylight
savings time causes one day a year to have 23 hours and
one day to have 25 hours.

calccustomhours(datestruct dates, datestruct customdates)
{ //calculate the number of hours between two specified
dates

//calculate the number of days between the two dates
and multiply
//by 24 to find the number of hours between the dates
return calccustomdays(dates, customdates) * 24;
}

Discussion

  • John Bailey

    John Bailey - 2004-06-26

    Logged In: YES
    user_id=606440

    We haven't been taking daylight savings time into account because so little
    of the world uses it, and there are at least three states (Indiana, Arizona,
    and Michigan) in the US that don't use it.

    We have tossed this idea around several times, and haven't yet found an
    accurate solution that can be implemented without making the results
    inaccurate for users who do not use DST.

    If anyone else can come up with an accurate method that doesn't affect
    non-DST users, patches are always welcome.

     
  • John Bailey

    John Bailey - 2004-06-26
    • priority: 5 --> 3
     
  • John Bailey

    John Bailey - 2005-06-05
    • priority: 3 --> 1
    • assigned_to: nobody --> rekkanoryo
    • status: open --> closed-wont-fix
     

Log in to post a comment.