Time zones (again)

Linus Torvalds torvalds at linux-foundation.org
Tue Jun 21 08:18:24 PDT 2016


On Jun 21, 2016 01:16, "Robert Helling" <helling at atdotde.de> wrote:
>
> What I propose is upon initialization setTimezoneSpec
> once with UTC then for conversion functions there is no
> further need to explicitly state time zone specifications

I don't think we can do that.

There are several cases where we do want local time, notably when we ask
the system "what time is it now". Then we want the hours, minutes and
seconds as they are locally, not as they are in UTC.

We then convert the end result into "what would that be in UTC", but to
initially get the current time field we need local time conversion.

Globally setting "we want UTC" might also screw up other things - I could
imagine things like file open dialogs showing odd times etc

But maybe I misunderstand what you were proposing. But I think the UTC
thing needs to be done per operation, not set once at init time.

Every time we work with our own timestamp_t, we'll want UTC, but sometimes
we do look up times that aren't dive times (yet).

    Linus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160621/cd731bd4/attachment-0001.html>


More information about the subsurface mailing list