[gnome-desktop] test-wall-clock: Set locale



commit e6e5acd29a470f2b22744aeaadfcb602842c84e7
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Dec 28 11:20:32 2012 -0500

    test-wall-clock: Set locale
    
    When dealing with time formatting, setting locale is required
    to get any interesting results.

 libgnome-desktop/test-wall-clock.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libgnome-desktop/test-wall-clock.c b/libgnome-desktop/test-wall-clock.c
index a1c591c..ebdf9b8 100644
--- a/libgnome-desktop/test-wall-clock.c
+++ b/libgnome-desktop/test-wall-clock.c
@@ -1,3 +1,4 @@
+#include <locale.h>
 #define GNOME_DESKTOP_USE_UNSTABLE_API
 #include <libgnome-desktop/gnome-wall-clock.h>
 
@@ -17,6 +18,8 @@ int main (int argc, char **argv)
 	GMainLoop *loop;
 	GnomeWallClock *clock;
 
+        setlocale (LC_ALL, "");
+
 	g_setenv ("G_MESSAGES_DEBUG", "all", TRUE);
 
 	loop = g_main_loop_new (NULL, FALSE);



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