in reply to Re: Subtract Hours
in thread Subtract Hours

Without the date you will always have to make some assumptions about your input

Such as the lack to timezone change. For example, there can be 3 4, or 5 hours between 11pm and 3am depending on the date.

Replies are listed 'Best First'.
Re^3: Subtract Hours
by Limbic~Region (Chancellor) on Jun 22, 2009 at 14:40 UTC
    ikegami,
    I really don't think Anonymous Monk is trying to do anything complicated. See Monthly hours report. I think this is just a matter of finding out how many hours between the first time entered and the second assuming you are always moving the clock forward (and not working for > 24 hrs consecutively). DST could still bite you but if you are writing your own code to manage your hours and haven't bothered to use a module - I say you get what you ask for.

    Cheers - L~R

      I really don't think Anonymous Monk is trying to do anything complicated.

      I agree, which is why I didn't write the code to handle it. It was a "in case you didn't think about it and it matters" comment.