reset LC_TIME
authorMichael Andres <ma@suse.de>
Fri, 16 Nov 2007 14:50:36 +0000 (14:50 +0000)
committerMichael Andres <ma@suse.de>
Fri, 16 Nov 2007 14:50:36 +0000 (14:50 +0000)
zypp/Date.cc

index 36501ac..d5f2240 100644 (file)
@@ -70,10 +70,20 @@ namespace zypp
       }
       ::setlocale( LC_TIME, needLocale.c_str() );
     }
+    else
+    {
+      // no need to change the locale
+      thisLocale.clear();
+    }
 
     if ( ! strftime( buf, 1024, format_r.c_str(), localtime( &_date ) ) )
       *buf = '\0';
 
+    if ( ! thisLocale.empty() )
+    {
+      ::setlocale( LC_TIME, thisLocale.c_str() );
+    }
+
     return buf;
   }