From 7015c9fa8c52bbfcc945cc525bdd842ef7f67859 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Tue, 28 Jul 2020 18:01:17 +0000 Subject: [PATCH] fpspreadsheet: Fix usage of UTC in ODS meta data. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7581 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/source/common/fpsopendocument.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/fpspreadsheet/source/common/fpsopendocument.pas b/components/fpspreadsheet/source/common/fpsopendocument.pas index 5e35e6f65..b67c3eada 100644 --- a/components/fpspreadsheet/source/common/fpsopendocument.pas +++ b/components/fpspreadsheet/source/common/fpsopendocument.pas @@ -5819,13 +5819,15 @@ begin if book.MetaData.DateCreated > 0 then begin - s := FormatDateTime(ISO8601FormatExtended, book.MetaData.DateCreated); + // ODS stored the creation date in UTC. + s := FormatDateTime(ISO8601FormatExtendedUTC, book.MetaData.DateCreated); AppendToStream(FSMeta, Format( '%s', [s])); end; if book.MetaData.DateLastModified > 0 then begin + // Date of last modification is NOT UTC. s := FormatDateTime(ISO8601FormatExtended, book.MetaData.DateLastModified); AppendToStream(FSMeta, Format( '%s', [s]));