[Pkg-running-devel] [antpm] 43/48: make the time conversion a bit more readable/debuggable

Kristof Ralovich ralovich-guest at moszumanska.debian.org
Mon Aug 11 10:10:34 UTC 2014


This is an automated email from the git hooks/post-receive script.

ralovich-guest pushed a commit to branch upstream
in repository antpm.

commit 4248aa85145902fc7e3427fe818daf484f6196ed
Author: RALOVICH, Kristof <tade60 at freemail.hu>
Date:   Tue Apr 8 15:45:57 2014 +0200

    make the time conversion a bit more readable/debuggable
---
 src/DeviceSettings.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/DeviceSettings.cpp b/src/DeviceSettings.cpp
index a196e7f..b88cde5 100644
--- a/src/DeviceSettings.cpp
+++ b/src/DeviceSettings.cpp
@@ -85,7 +85,9 @@ DeviceSettings::str2time(const char* from)
   boost::posix_time::ptime t(boost::posix_time::time_from_string(froms));
   tm = boost::posix_time::to_tm( t );
 #endif
-  return ::mktime(&tm) - timezone;
+  std::time_t myt  = ::mktime(&tm);
+  std::time_t mytz = timezone;
+  return myt - mytz;
 }
 
 /// Both input and output are represented in GMT/UTC.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/antpm.git



More information about the Pkg-running-devel mailing list