sc/source/core/data/postit.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 1d3a5419b242b10ed3793b16211ef1f62b159def
Author:     Pranam Lashkari <lpra...@collabora.com>
AuthorDate: Mon Feb 24 20:45:01 2025 +0530
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Feb 24 20:20:36 2025 +0100

    sc comment: use standerd ISO date format for comment
    
    problem:
    in online when comments are stored in one language (i.e: en-us)
    and opened in another language(i.e: de) it caused months and
    day to be swapped which caused incorrect date stamp for comment
    
    Change-Id: Ibaf3a5cc30389f261c14381356dbc8bdcf794639
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182093
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 570dd28142f7..6465ac2622bb 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -23,6 +23,7 @@
 #include <rtl/ustrbuf.hxx>
 #include <sal/log.hxx>
 #include <unotools/useroptions.hxx>
+#include <unotools/datetime.hxx>
 #include <svx/svdocapt.hxx>
 #include <svx/svdpage.hxx>
 #include <svx/unoshape.hxx>
@@ -507,8 +508,8 @@ void ScPostIt::AutoStamp(bool bCreate)
 {
     if (bCreate)
     {
-        maNoteData.maDate = 
ScGlobal::getLocaleData().getDate(Date(Date::SYSTEM)) + " "
-                            + 
ScGlobal::getLocaleData().getTime(DateTime(DateTime::SYSTEM), false);
+        DateTime aNow(DateTime::SYSTEM);
+        maNoteData.maDate =  utl::toISO8601(aNow.GetUNODateTime());
     }
     if (!maNoteData.maAuthor.isEmpty())
         return;

Reply via email to