diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-11-27 20:42:27 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-11-27 20:42:40 +0100 |
commit | 90fee64024c7168cdcebba5f9556fcf892c5fb77 (patch) | |
tree | ccb08b033e16478d7d35f39698958c10b586f2d3 | |
parent | 5a5816eb071a9674396b83d712e90351107293df (diff) | |
download | tdetoys-90fee64024c7168cdcebba5f9556fcf892c5fb77.tar.gz tdetoys-90fee64024c7168cdcebba5f9556fcf892c5fb77.zip |
KWeather: Add current date to the log entries
This relates to bug 2728
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 8aedce54f45a6debc32db7eb17f226bc695738a8)
-rw-r--r-- | kweather/kweather.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kweather/kweather.cpp b/kweather/kweather.cpp index ab176f3..71fe647 100644 --- a/kweather/kweather.cpp +++ b/kweather/kweather.cpp @@ -29,6 +29,7 @@ #include <ksettings/dispatcher.h> #include <dcopclient.h> +#include <tqdatetime.h> #include <tqfile.h> #include <tqtimer.h> #include <tqpalette.h> @@ -257,6 +258,7 @@ void kweather::writeLogEntry() TQStringList weather = mWeatherService->weather(reportLocation ); TQStringList cover = mWeatherService->cover(reportLocation ); TQString visibility = mWeatherService->visibility(reportLocation ); + logFileStream << TDEGlobal::locale()->formatDateTime(TQDateTime::currentDateTime(), false, false) << ","; logFileStream << date << ","; logFileStream << wind << ","; logFileStream << temperature << ","; @@ -343,7 +345,7 @@ void kweather::slotPrefsAccepted() { // Empty file, put the header TQTextStream logFileStream(&logFile); - logFileStream << "Date,Wind Speed & Direction,Temperature,Pressure,Cover,Visibility,Current Weather" << endl; + logFileStream << "Date,Last Updated,Wind Speed & Direction,Temperature,Pressure,Cover,Visibility,Current Weather" << endl; } logFile.close(); } |