Re: Cleanup in gnome-dateedit.c



l?, 03.05.2003 kl. 14.05 skrev Damon Chaplin:
> On Thu, 2003-05-01 at 14:16, Kjartan Maraas wrote:
> > Hi.
> > 
> > Is there any reason why the attached cleanup wouldn't work?
> 
> -               if (gde->_priv->flags & GNOME_DATE_EDIT_24_HR) {
> -                       if (strftime (buffer, sizeof (buffer),
> -                                     "%H:00", mtm) == 0)
> -                               strcpy (buffer, "???");
> -               } else {
> -                       if (strftime (buffer, sizeof (buffer),
> -                                     "%I:00 %p ", mtm) == 0)
> -                               strcpy (buffer, "???");
> -               }
> +               if (strftime (buffer, sizeof (buffer), "%X", mtm) == 0)
> +                       strcpy (buffer, "???");
> +
> 
> You're just ignoring the GNOME_DATE_EDIT_24_HR flag, which can't be
> right!
> 
> In some places (like Britain) some people prefer 12-hour format and some
> prefer 24-hour format. So I think there should be a choice.
> 
I just thought that %x and %X would do the right thing according to the
locale's defaults. Never mind then.

Cheers
Kjartan




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