From 23a46b4be35277e06ec89f48730eeb694e686be8 Mon Sep 17 00:00:00 2001
From: Kenmegne <stephanie.kenmegne@gmail.com>
Date: Thu, 18 Jun 2026 15:40:06 +0000
Subject: [PATCH] add fdx-commons and fdx-consultation
---
fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/referentiel/LocalDateTimeAdapter.java | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/referentiel/LocalDateTimeAdapter.java b/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/referentiel/LocalDateTimeAdapter.java
new file mode 100644
index 0000000..f3910a7
--- /dev/null
+++ b/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/referentiel/LocalDateTimeAdapter.java
@@ -0,0 +1,31 @@
+/*
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
+ */
+package com.megatim.fdxcommons.model.referentiel;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+/**
+ *
+ * @author ASUS
+ */
+public class LocalDateTimeAdapter extends XmlAdapter<String, LocalDateTime> {
+
+ @Override
+ public LocalDateTime unmarshal(String v) throws Exception {
+ try {
+ return LocalDateTime.parse(v);
+ } catch (Exception ex) {
+ return LocalDateTime.parse(v, DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm:ss"));
+ }
+ }
+
+ @Override
+ public String marshal(LocalDateTime v) throws Exception {
+ return v.toString();
+ }
+
+}
--
Gitblit v1.10.0