diff --git a/misp/client/src/main/scala/org/thp/misp/dto/Attribute.scala b/misp/client/src/main/scala/org/thp/misp/dto/Attribute.scala index 4a79cb0d57..cf47db5544 100644 --- a/misp/client/src/main/scala/org/thp/misp/dto/Attribute.scala +++ b/misp/client/src/main/scala/org/thp/misp/dto/Attribute.scala @@ -28,11 +28,8 @@ case class Attribute( object Attribute { - val formatter: DateTimeFormatter = new DateTimeFormatterBuilder() - .append(DateTimeFormatter.ISO_LOCAL_DATE_TIME) - .appendPattern("XX") - .toFormatter - def parseDate(s: String): Date = new Date(OffsetDateTime.parse(s, formatter).toInstant.toEpochMilli) + def parseDate(s: String): Date = + javax.xml.bind.DatatypeConverter.parseDateTime(s).getTime implicit val reads: Reads[Attribute] = ((JsPath \ "id").read[String] and