简体   繁体   English

jOOQ:使用TIME ZONE解析Oracle TIMESTAMP时出错

[英]jOOQ: Error parsing Oracle TIMESTAMP WITH TIME ZONE

I am having an issue parsing Oracle (11.2.0.4.0) TIMESTAMP(6) WITH TIME ZONE values to OffsetDateTime : 我有一个问题解析Oracle(11.2.0.4.0) TIMESTAMP(6) WITH TIME ZONE值到OffsetDateTime

java.time.format.DateTimeParseException: Text '2014-03-28T15:11:49.508918 -4:00' could not be parsed at index 26
    java.time.format.DateTimeFormatter.parseResolved0(Unknown Source)
    java.time.format.DateTimeFormatter.parse(Unknown Source)
    java.time.OffsetDateTime.parse(Unknown Source)
    java.time.OffsetDateTime.parse(Unknown Source)
    org.jooq.impl.DefaultBinding.offsetDateTime(DefaultBinding.java:1539)

I think this is the issue described here: https://github.com/jOOQ/jOOQ/issues/4965 我认为这是这里描述的问题: https//github.com/jOOQ/jOOQ/issues/4965

The not-quite-iso8601 value produced by Oracle ( 2014-03-28T15:11:49.508918 -4:00 ) actually has two problems that are rejected by OffsetDateTime.parse : Oracle( 2014-03-28T15:11:49.508918 -4:00 )产生的不太完全iso8601值实际上有两个被OffsetDateTime.parse拒绝的OffsetDateTime.parse

  • single-digit hour (as per #4965) 一位数小时(根据#4965)
  • space before the offset 偏移前的空间

Is there a workaround, until the fix arrives (in 3.9)? 是否有解决方法,直到修复程序到达(在3.9中)?

jOOQ version 3.8 does not yet fully support TIMESTAMP WITH TIME ZONE data types (which would map to Java 8's JSR 310 types). jOOQ版本3.8尚未完全支持TIMESTAMP WITH TIME ZONE数据类型(将映射到Java 8的JSR 310类型)。 For the time being, you will have to implement your own support via a data type binding as explained here in the manual: 目前,您必须通过数据类型绑定实现自己的支持,如手册中所述:

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 postgres中的“带时区的时间戳”的Jooq绑定 - Jooq binding for “timestamp with time zone” type in postgres 如何使用 JOOQ 将 TIMESTAMP WITH TIME ZONE 插入 HSQLDB - How to insert TIMESTAMP WITH TIME ZONE into HSQLDB using JOOQ 当我在 Jooq 中插入日期时,出现此错误:column creation_date is of type timestamp with time zone but expression is of type character varying - When I insert a date in Jooq, I get this error: column creation_date is of type timestamp with time zone but expression is of type character varying PostgreSQL 参数错误(timestamp with time zone, timestamp without time zone) - PostgreSQL Parameter error (timestamp with time zone, timestamp without time zone) Oracle / JDBC:以ISO 8601格式检索TIMESTAMP WITH TIME ZONE值 - Oracle / JDBC: retrieving TIMESTAMP WITH TIME ZONE value in ISO 8601 format 带时间戳的时间戳(6)与时间戳 - TIMESTAMP (6) WITH TIME ZONE to Time stamp 如何在oracle中使用where子句查询从oracle获取TIMESTAMP WITH TIME ZONE列值和行? - How to get the TIMESTAMP WITH TIME ZONE column value and rows from oracle with where clause query in oracle? JavaLite,通过时区获取TIMESTAMP(6) - JavaLite, get TIMESTAMP(6) WITH TIME ZONE 在Oracle JDBC驱动程序中,将Java日期写入TIMESTAMP列时,时区会发生什么? - In the Oracle JDBC driver, what happens to the time zone when you write a Java date to a TIMESTAMP column? 用Joda和时区解析约会 - Parsing date with Joda with time zone
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM