diff options
Diffstat (limited to 'src/gui/painting/qpdf.cpp')
-rw-r--r-- | src/gui/painting/qpdf.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index 84e18a64dd..7b8bae1642 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -1504,16 +1504,25 @@ void QPdfEnginePrivate::writeInfo() printString(creator); xprintf("\n/Producer "); printString(QString::fromLatin1("Qt " QT_VERSION_STR)); - QDateTime now = QDateTime::currentDateTimeUtc(); + QDateTime now = QDateTime::currentDateTime(); QTime t = now.time(); QDate d = now.date(); - xprintf("\n/CreationDate (D:%d%02d%02d%02d%02d%02d)\n", + xprintf("\n/CreationDate (D:%d%02d%02d%02d%02d%02d", d.year(), d.month(), d.day(), t.hour(), t.minute(), t.second()); + int offset = now.offsetFromUtc(); + int hours = (offset / 60) / 60; + int mins = (offset / 60) % 60; + if (offset < 0) + xprintf("-%02d'%02d')\n", -hours, -mins); + else if (offset > 0) + xprintf("+%02d'%02d')\n", hours , mins); + else + xprintf("Z)\n"); xprintf(">>\n" "endobj\n"); } |