KDateTime: next iteration

Thiago Macieira thiago at kde.org
Tue Nov 29 10:11:51 GMT 2005


Nicolas Goutte wrote:
>On Monday 28 November 2005 21:50, Thiago Macieira wrote:
>> David Jarvie wrote:
>> >  UTC
>> >   Offset from UTC
>>
>> What's the difference between those two? UTC is UTC + 0 (or -0, if
>> you'd rather), so it's the same as an offset from UTC.
>
>07:20 +0000 (UTC) is not the same as 08:20 +0100 ("Offset from UTC")

So we have 1500 types of timezones? One for each possible minute of the 
25-hour span of timezones?

I thought David listed 5 types.

>It could become useful for example if Konqueror uses KDateTime instead
> of seconds since the epoch. In that case, you can use it in the FISH
> KIO slave to tell that you have no idea about the timezone, as it is an
> information thatthe FISH protocol does not transmit.

FISH should be modified to transmit it. All it has to do is set TZ=UTC 
before sending anything.

>> Or unless we're talking about an "unknown" timezone (which
>> means this should fall into the "Local time zone", which is in turn a
>> special case of "time zone").
>
>I do not think so. It is better to be allow to tell the user that the
> timezone is unknown than to force it to UTC or to local time (in
> QDateTime's sence).

I don't agree. We should keep in mind that this time will get transformed 
into the standard UTC-seconds-since-epoch of Unix time, so this 
information will be irreparably lost.

The only case I can think of KDateTime doing this distinction would be if 
it provided comparison operators (in that case, "01:00 unknown" > "00:00 
UTC" as well as "00:00 GMT-1") or if it provided elapsed-time operators 
(you cannot tell how much time elapsed from "unknown" to "known" 
timezones).

>> So, by my account, there are only two types:
>> 1) offset-only
>> 2) detailed (with latitude, longitude, name and DST historic)
>
>But then you completely lose comaptibility to QDateTime, which is not
> wanted.

That's not what I meant. From the discussion, it seemed we're talking 
about backends to store information. We have only 2 (or 3, with the 
"unknown" type) backends.

I raised this issue specifically to make sure we don't create unnecessary 
backends.
-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

4. And æfter se scieppend ingelogode, he wrát "cenn", ac eala! se 
rihtendgesamnung andswarode "cenn: ne wát hú cennan 'eall'. Ástynt."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20051129/321d8fd1/attachment.sig>


More information about the kde-core-devel mailing list