[midPoint-git] [Evolveum/midpoint] 1c5b8a: MID-6361: Add timezone to xsd:DateTime if not present

Tony Tkáčik noreply at github.com
Mon Sep 28 15:00:47 CEST 2020


  Branch: refs/heads/master
  Home:   https://github.com/Evolveum/midpoint
  Commit: 1c5b8a13bb9b43101a3071c4a3e5593684fccf32
      https://github.com/Evolveum/midpoint/commit/1c5b8a13bb9b43101a3071c4a3e5593684fccf32
  Author: Tony Tkacik <tonydamage at gmail.com>
  Date:   2020-09-28 (Mon, 28 Sep 2020)

  Changed paths:
    M infra/prism-api/pom.xml
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/xml/XmlTypeConverter.java
    M infra/schema/src/test/java/com/evolveum/midpoint/schema/TestJaxbParsing.java
    M infra/schema/src/test/java/com/evolveum/midpoint/schema/TestParseGenericObject.java
    M infra/util/src/main/java/com/evolveum/midpoint/util/MiscUtil.java

  Log Message:
  -----------
  MID-6361: Add timezone to xsd:DateTime if not present

During parsing / creation XmlGregorianCalendar (xsd:DateTime) add local system timezone
if timezone is not present.
Current process is parse XmlGregorianCalendar, convert it to GregorianCalendar and
then convert it to XmlGregorianCalendar again.

Roundtrip via GregorianCalendar ensures that local timezone addition is same for:
  - converting from UNIX time (time millis)
  - converting from GregorianCalendar
  - fixing up missing timezone in XmlGregorianCalendar

Signed-off-by: Tony Tkacik <tonydamage at gmail.com>




More information about the midPoint-svn mailing list