ToastFreeware
/
toast
/
confclerk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0dc6313
)
This at least partly fixes #42 ("fun with time zones").
author
Philipp Spitzer
<philipp@spitzer.priv.at>
Wed, 2 May 2012 21:45:10 +0000
(21:45 +0000)
committer
Philipp Spitzer
<philipp@spitzer.priv.at>
Wed, 2 May 2012 21:45:10 +0000
(21:45 +0000)
src/orm/ormrecord.h
patch
|
blob
|
history
diff --git
a/src/orm/ormrecord.h
b/src/orm/ormrecord.h
index 49c83c8a5c2f79dd4b677adc89ced829ad20c401..73541e2baa5a78ac1f5e6b17d4c3844deb97a48f 100644
(file)
--- a/
src/orm/ormrecord.h
+++ b/
src/orm/ormrecord.h
@@
-215,7
+215,9
@@
QVariant OrmRecord<T>::convertToDb(QVariant value, QVariant::Type colType)
{
if (colType == QVariant::DateTime && value.canConvert<QDateTime>())
{
- return value.toDateTime().toTime_t();
+ QDateTime dateTime = value.toDateTime();
+ dateTime.setTimeSpec(Qt::UTC); // this is to avoid that dateTime.toTime_t changes the time depending on the local time zone
+ return dateTime.toTime_t();
}
return value;