RFC: Timestamps/timezones proposal
Charles Day
cedayiv at gmail.com
Fri Jul 18 14:28:45 EDT 2008
On Fri, Jul 18, 2008 at 11:18 AM, Mike Alexander <mta at umich.edu> wrote:
> --On July 18, 2008 7:18:06 PM +0200 Graham Leggett <minfrin at sharp.fm>
> wrote:
>
> If a timestamp is used, it means that every single piece of time
>> related code, must correctly respect the account timezone, at all
>> times moving forward during development.
>>
>> As soon as *one* developer at *any* time in the future makes *one*
>> mistake with regards to the timezone, the bug is back.
>>
>> The core premise behind defensive coding is choosing coding
>> strategies that make it very difficult to make mistakes.
>>
>> It is difficult to get a date wrong, because "1 March 2008" is always
>> and without exception equal to "1 March 2008". "2 March 2008" is
>> always and without exception exactly one day after "1 March 2008".
>>
>> If you want to make life difficult for yourself and for end users,
>> stick with the timestamps.
>>
>
> Having had enough problems with times and time zones over 40 years of
> programming computers, I agree with Graham. It's probably more pain to fix
> things right now, but less pain in the long run. Fixing it right also might
> not be as much pain as it appears to be.
>
You may be right; I'm not saying otherwise. If someone could also show that
it was impossible to provide users with a "date only" look and feel while
using timestamps internally, that would really make the decision a lot
simpler. This is what I don't know the answer to, and what I'm trying to
find out.
> Mike
>
>
-Charles
More information about the gnucash-devel
mailing list