From 8aedce54f45a6debc32db7eb17f226bc695738a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 27 Nov 2016 20:42:27 +0100 Subject: [PATCH] KWeather: Add current date to the log entries This relates to bug 2728 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- kweather/kweather.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 #include +#include #include #include #include @@ -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(); }