]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/strutl.cc
Make private sha2 functions static
[apt.git] / apt-pkg / contrib / strutl.cc
index ace738d7a13599ab73b1ef628387dd7f7dbfc2d8..072dda3ac3b1f74b76f403c4d79bbaffdc5fbbae 100644 (file)
@@ -692,9 +692,11 @@ int StringToBool(const string &Text,int Default)
    year 2000 complient and timezone neutral */
 string TimeRFC1123(time_t Date)
 {
-   struct tm Conv = *gmtime(&Date);
-   char Buf[300];
+   struct tm Conv;
+   if (gmtime_r(&Date, &Conv) == NULL)
+      return "";
 
+   char Buf[300];
    const char *Day[] = {"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
    const char *Month[] = {"Jan","Feb","Mar","Apr","May","Jun","Jul",
                           "Aug","Sep","Oct","Nov","Dec"};