summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRALOVICH, Kristof <tade60@freemail.hu>2014-04-08 15:45:57 +0200
committerRALOVICH, Kristof <tade60@freemail.hu>2014-04-08 15:45:57 +0200
commit4248aa85145902fc7e3427fe818daf484f6196ed (patch)
tree5b069a3cec32f2c3f446d5e2dc7e7db753814001
parent7d4c603f3cbd234c98a1c101d63a177fd439e665 (diff)
make the time conversion a bit more readable/debuggable
-rw-r--r--src/DeviceSettings.cpp4
1 files changed, 3 insertions, 1 deletions
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.