[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:36:30 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=efe5b52

The following commit has been merged in the master branch:
commit efe5b524cacfd1e534959433992ed25dc959ad13
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Tue Jul 6 14:38:40 2004 +0000

    Bugfix: Use timegm() and gmtime() instead of mktime() and localtime() to
    avoid problems with DST.
---
 src/actions.cpp | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/actions.cpp b/src/actions.cpp
index df3415d..25d066c 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -20,13 +20,13 @@
  */
 /*
   File:      actions.cpp
-  Version:   $Name:  $ $Revision: 1.27 $
+  Version:   $Name:  $ $Revision: 1.28 $
   Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
   History:   08-Dec-03, ahu: created
  */
 // *****************************************************************************
 #include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.27 $ $RCSfile: actions.cpp,v $")
+EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.28 $ $RCSfile: actions.cpp,v $")
 
 // *****************************************************************************
 // included header files
@@ -61,10 +61,10 @@ namespace {
     // returns 0 if successful
     int str2Tm(const std::string& timeStr, struct tm* tm);
 
-    // Convert a string "YYYY:MM:DD HH:MI:SS" to a time type, -1 on error
+    // Convert a string "YYYY:MM:DD HH:MI:SS" to a UTC time, -1 on error
     time_t str2Time(const std::string& timeStr);
 
-    // Convert a time type to a string "YYYY:MM:DD HH:MI:SS", "" on error
+    // Convert a UTC time to a string "YYYY:MM:DD HH:MI:SS", "" on error
     std::string time2Str(time_t time);
 
 }
@@ -527,7 +527,7 @@ namespace Action {
             if (s[0] != 'y' && s[0] != 'Y') return 0;
         }
         // Workaround for MinGW rename which does not overwrite existing files
-        ::remove(newPath.c_str());
+        remove(newPath.c_str());
         if (::rename(path.c_str(), newPath.c_str()) == -1) {
             std::cerr << Params::instance().progname()
                       << ": Failed to rename "
@@ -823,7 +823,7 @@ namespace {
         if (   timeStr[4]  != ':' || timeStr[7]  != ':' || timeStr[10] != ' '
             || timeStr[13] != ':' || timeStr[16] != ':') return 3;
         if (0 == tm) return 4;
-        ::memset(tm, 0x0, sizeof(struct tm));
+        memset(tm, 0x0, sizeof(struct tm));
 
         long tmp;
         if (!Util::strtol(timeStr.substr(0,4).c_str(), tmp)) return 5;
@@ -846,12 +846,13 @@ namespace {
     {
         struct tm tm;
         if (str2Tm(timeStr, &tm) != 0) return (time_t)-1;
-        return ::mktime(&tm);
+        time_t t = timegm(&tm);
+        return t;
     }
 
     std::string time2Str(time_t time)
     {
-        struct tm* tm = localtime(&time);
+        struct tm* tm = gmtime(&time);
         if (0 == tm) return "";
 
         std::ostringstream os;

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list