You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Axel Hanikel (JIRA)" <ji...@apache.org> on 2015/11/17 15:10:11 UTC

[jira] [Comment Edited] (OAK-3645) RDBDocumentStore: server time detection for DB2 fails due to timezone/dst differences

    [ https://issues.apache.org/jira/browse/OAK-3645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15008694#comment-15008694 ] 

Axel Hanikel edited comment on OAK-3645 at 11/17/15 2:09 PM:
-------------------------------------------------------------

I'm not sure if DB/2 has something like a UNIX_TIMESTAMP but I think the following should work (based on the answer on StackOverflow and what Thomas has said):

{noformat}
select (current_timestamp(4) - current_timezone) || ' +00:00' from sysibm.sysdummy1
{noformat}



was (Author: ahanikel):
I'm not sure if DB/2 has something like a UNIX_TIMESTAMP but I think the following should work:

{noformat}
select (current_timestamp(4) - current_timezone) || ' +00:00' from sysibm.sysdummy1
{noformat}


> RDBDocumentStore: server time detection for DB2 fails due to timezone/dst differences
> -------------------------------------------------------------------------------------
>
>                 Key: OAK-3645
>                 URL: https://issues.apache.org/jira/browse/OAK-3645
>             Project: Jackrabbit Oak
>          Issue Type: Technical task
>          Components: rdbmk
>    Affects Versions: 1.3.10, 1.2.8, 1.0.24
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>
> We use {{CURRENT_TIMESTAMP(4)}} to ask the DB for it's system time.
> Apparently, at least with DB2, this might return a value that is off by a multiple of one hour (3600 * 1000ms) depending on whether the OAK instance and the DB run in different timezones.
> Known to work: both on the same machine.
> Known to fail: OAK in CET, DB2 in UTC, in which case we're getting a timestamp one hour in the past.
> At this time it's not clear whether the same problem occurs for other databases.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)