Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
libkleo
Commits
90bf972a
Commit
90bf972a
authored
Aug 17, 2022
by
Ingo Klöcker
Browse files
Always treat time_t as an unsigned 32-bit number
All time fields in OpenPGP are unsigned four-octet numbers.
parent
ec9eccef
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/utils/formatting.cpp
View file @
90bf972a
...
...
@@ -293,7 +293,7 @@ QString format_subkeyusage(const Subkey &subkey)
static
QString
time_t2string
(
time_t
t
)
{
const
QDateTime
dt
=
QDateTime
::
fromSecsSinceEpoch
(
t
);
const
QDateTime
dt
=
QDateTime
::
fromSecsSinceEpoch
(
quint32
(
t
)
);
return
QLocale
().
toString
(
dt
,
QLocale
::
ShortFormat
);
}
...
...
@@ -525,7 +525,7 @@ static QDate time_t2date(time_t t)
if
(
!
t
)
{
return
{};
}
const
QDateTime
dt
=
QDateTime
::
fromSecsSinceEpoch
(
t
);
const
QDateTime
dt
=
QDateTime
::
fromSecsSinceEpoch
(
quint32
(
t
)
);
return
dt
.
date
();
}
static
QString
accessible_date_format
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment