Skip to content

Commit

Permalink
Fixes: #5. Sqlite stores date time in UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
jmlich committed Jan 10, 2025
1 parent 433a260 commit 76946f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/blockmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ void BlockModel::loadAll() {
QString name = query.value(1).toString();
QString note = query.value(2).toString();
QDateTime lastSeen = query.value(3).toDateTime();
lastSeen.setTimeSpec(Qt::UTC);
lastSeen = lastSeen.toLocalTime();
bool blocked = query.value(4).toBool();
int count = query.value(5).toInt();
m_blocks.append(BlockItem(number, name, note, lastSeen, blocked, count));
Expand Down

0 comments on commit 76946f2

Please sign in to comment.