Re: Cleanup in gnome-dateedit.c



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.

Damon





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