[horde] Setting date and time preferences

Jens Wahnes wahnes at uni-koeln.de
Tue Apr 21 21:15:51 UTC 2015


On Tue, Apr 21 2015, at 21:12:01 +0200, Jan Schneider wrote:

>> For instance, the default date format seems to be set depending on
>> the locale, but the time format isn't (i.e., it remains with 12 hour
>> time even with locales that would ordinarily use 24 hour time). Is
>> that on purpose?

> Yes. While the date format preference can take arbitrary format  
> specifiers (that don't even need to actually display a date), the dates 
> in the dynamic interface of Kronolith need to be parseable. Thus we need 
> to make sure to have a format that we actually can read back. Otherwise 
> we would have to use date pickers like in the basic view.

Maybe I didn't make myself quite clear, or maybe I don't understand
what you are saying.

I can see that the date format needs to be parsable and thus handling
dates is not as easy as just displaying "date +%x" (in shell terms) by
default, but I can't really see why the same argument would not apply
to time format as well? The time values a user enters into Kronolith
will need to be parsed according to this user's current time settings
as well, won't they?

Or yet another way to put it: There seems to be code that derives a
default date format from the locale, but then why isn't there code that
does the same for the "twentyFour" preference?

Just to make sure we're on the same page, here are two screenshots to
illustrate what I'm referring to: 

http://666kb.com/i/cxzgeot5os6oy51wh.png

Here, I logged into Horde with English language settings and opened up
an example event. Note that the date is displayed as "05/01/2015", that
is month first, then day, then year.

http://666kb.com/i/cxzggii6x5uo2clpd.png

This time, I logged into Horde with German language and displayed the
same event. Note that the date shows "01.05.2015" just as one would
expect for this locale (day first, then month, then year, all separated
by dots), but the time remains "07:00 PM" which one would not expect in
this locale.

>> So, what's the right way to set defaults for these values?
> See the other reply

Are you referring to Mauricio's message? That didn't really help me
out, and, so far, I didn't receive any other reply.


Jens
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.horde.org/archives/horde/attachments/20150421/7dc9a266/attachment.bin>


More information about the horde mailing list