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

Wrong Timestamp conversion from client API [CORE3670] #4020

Open
firebird-automations opened this issue Nov 21, 2011 · 0 comments
Open

Wrong Timestamp conversion from client API [CORE3670] #4020

firebird-automations opened this issue Nov 21, 2011 · 0 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Lars Liedtke (corvan)

When I call the Timestamp conversion functions I have to do this:
WINEXPORT void decodeTimestamp(TIMESTAMP* timestamp, struct tm* tm)
{
// error correction in timestamp calculation of Firebird 2.5
timestamp->timestamp_date = timestamp->timestamp_date + Dec31_1899;
isc_decode_timestamp(timestamp, tm);
}

WINEXPORT void encodeTimestamp(struct tm* tm, TIMESTAMP* timestamp)
{
isc_encode_timestamp(tm, timestamp);
// error correction in timestamp calculation of Firebird 2.5
timestamp->timestamp_date = timestamp->timestamp_date - Dec31_1899;
}

Dec31_1899 is a const declared like this:
const int Dec31_1899 = 693960;

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

No branches or pull requests

1 participant