[Sugar-devel] [PATCH] revise timezone list, #2195

Sascha Silbe sascha-ml-reply-to-2011-2 at silbe.org
Sun Apr 3 07:42:49 EDT 2011


Excerpts from James Cameron's message of Wed Mar 23 00:58:09 +0100 2011:

> > Thanks for the patch! It's a good start, but unfortunately not enough.
> > POSIX defines TZ as "std offset dst offset, rule" [1], ...
> 
> No, according to [1] only the "std offset" form is required, the remaining
> fields are optional.  Therefore my patch is correct.

Yes, everything after the first offset is optional. That wasn't my
point. The problem here is that you can't specify an offset without also
giving the name of a time zone (at least in the POSIX standard format).

> Yes, the system will claim the local time zone to be UTC.  This is
> unchanged from before the patch.  The patch was not intended to fix
> this.  Do you consider it a problem?  It is not mentioned in #2195.
> Would you like a bug raised in trac?  It will only affect applications
> or activites that use TZ, and I don't have a list of those.  I cannot
> assess the impact.

Your last sentence highlights the issue: We're going from obviously
incorrect to partially incorrect and I can't tell what the effects of
the partial incorrectness will be.

> > Short term an option might be to parse the
> > /usr/share/zoneinfo/zone.tab file.
> 
> I don't understand what you mean.  Can you please explain further?  The
> code already reads zone.tab and uses the third field of non-comment
> lines.

D'oh. I checked the time zone list (in the UI), but obviously didn't
scroll enough to see the regular time zones. Sorry.

My immediate thought would be to just drop the additional, offset based
time zones. What exactly is the use case for these? If it's just time
zones that are missing from distributions, we should work on getting
them included upstream and patch either Sugar or the distribution
packages to include them in the meantime.

Other options, depending on the use case, might be:

1. Add time zones in /usr/share/zoneinfo/Etc to the list.
2. Turn the list into a ComboBoxEntry so users can enter arbitrary time
   zone values (in standard or implementation-defined format).
3. Tell users to directly manipulate the gconf setting
   (/desktop/sugar/date/timezone).

In any case, we should fix the code to either look up the standard
format for the chosen time zone or prefix the location name with a
colon.

Sascha

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 500 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110403/d88a50c8/attachment.pgp>


More information about the Sugar-devel mailing list