[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Local time in databases (Re: ntpsec as server questions)



On Thu, Dec 07, 2023 at 10:29:29PM +0700, Max Nikulin wrote:
> On 07/12/2023 21:22, John Hasler wrote:
> > Databases should never store local time.
> 
> I am anticipating a new branch of hot discussion.
> 
> There are exceptions when storing UTC instead of local time leads to
> undesired consequences.

Heh. There was one huge thread in Emacs user about a year ago (don't
ask me in which time zone).

You are right. Sometimes local time is the right thing. Sometimes it's
the wrong thing. Context matters and so on.

After having a long and fruitless discussion with a customer (they
insisted in having local time in a log file, which is almost always
the wrong thing) I came to the conclusion that in such situations
it's best to give them what they want -- but store time zone *and*
time offset with it.

> Planned (future) events may be bound namely to local time. So if timezone
> offset rules are changed [...]

Yep, that's one of those. Even on a planned change -- regular planned
events are local time: show up at work at 10 o'clock means local time.

[...]

The intersection of technology and "human stuff" is often messy. Look
closely at Unicode to have yet another bunch of fun :-)

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature


Reply to: