Commit 634ddb80 authored by Zren (Chris Holland)'s avatar Zren (Chris Holland)

Use ISO date/time in csv export

parent bd5a5a22
Pipeline #29144 passed with stage
in 14 minutes and 54 seconds
...@@ -220,16 +220,15 @@ bool KonsoleKalendarExports::exportAsCSV(QTextStream *ts, const Event::Ptr &even ...@@ -220,16 +220,15 @@ bool KonsoleKalendarExports::exportAsCSV(QTextStream *ts, const Event::Ptr &even
QString delim = i18n(","); // character to use as CSV field delimiter QString delim = i18n(","); // character to use as CSV field delimiter
QString dquote = i18n("\""); // character to use to quote CSV fields QString dquote = i18n("\""); // character to use to quote CSV fields
QLocale locale;
if (!event->allDay()) { if (!event->allDay()) {
*ts << pF(locale.toString(date)) *ts << pF(date.toString(Qt::ISODate))
<< delim << pF(locale.toString(event->dtStart().time())) << delim << pF(event->dtStart().time().toString(Qt::ISODate))
<< delim << pF(locale.toString(date)) << delim << pF(date.toString(Qt::ISODate))
<< delim << pF(locale.toString(event->dtEnd().time())); << delim << pF(event->dtEnd().time().toString(Qt::ISODate));
} else { } else {
*ts << pF(locale.toString(date)) *ts << pF(date.toString(Qt::ISODate))
<< delim << pF(QLatin1String("")) << delim << pF(QLatin1String(""))
<< delim << pF(locale.toString(date)) << delim << pF(date.toString(Qt::ISODate))
<< delim << pF(QLatin1String("")); << delim << pF(QLatin1String(""));
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment