Skip to content

Commit

Permalink
fix: wrong time format
Browse files Browse the repository at this point in the history
wrong time formmat when dock position is left or right

Bug: https://pms.uniontech.com/bug-view-276707.html
Log:
  • Loading branch information
FeiWang1119 committed Oct 15, 2024
1 parent 00e44d5 commit 8cfebdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/dde-dock/datetime/datetimewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ void DatetimeWidget::updateDateTimeString()
QString apText = current.toString("AP");
m_apLabel->setText(apText);

timeStr = current.toString("h:mm");
timeStr = current.toString("AP h:mm").split(" ").at(1);
} else {
timeStr = current.toString("hh:mm");
}
Expand Down Expand Up @@ -348,4 +348,4 @@ void DatetimeWidget::adjustUI()

m_spacerItem->setVisible(false);
m_apLabel->setVisible(false);
}
}

0 comments on commit 8cfebdd

Please sign in to comment.