Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hour,Minutes,Seconds increased by 1 #49

Open
c-bik opened this issue Jun 29, 2017 · 1 comment
Open

Hour,Minutes,Seconds increased by 1 #49

c-bik opened this issue Jun 29, 2017 · 1 comment
Assignees
Labels

Comments

@c-bik
Copy link
Member

c-bik commented Jun 29, 2017

cc : @ElMaxo

> SelStmt = OciSession:prep_sql(
    "select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS'), sysdate from dual").
> SelStmt:exec_stmt().
{cols,[{<<"TO_CHAR(SYSDATE,'DD-MM-YYYYHH24:MI:SS')">>,
        'SQLT_CHR',38,0,0},
       {<<"SYSDATE">>,'SQLT_DAT',7,0,0}]}
> SelStmt:fetch_rows(100).
{{rows,[[<<"29-06-2017 10:58:18">>,
         <<120,117,6,29,11,59,19>>]]},
 true}
> oci_util:oradate_to_str(<<120,117,6,29,11,59,19>>).
"****.06.29 11:59:19"

Hours, minutes and seconds shifted by 1

@c-bik c-bik added the bug label Jun 29, 2017
@c-bik c-bik self-assigned this Jun 29, 2017
@ElMaxo
Copy link

ElMaxo commented Jun 29, 2017

Here is an example of proper date decoding:
https://github.com/erlangbureau/jamdb_oracle/blob/master/src/jamdb_oracle_tns_decoder.erl#L548

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants