Issue Details (XML | Word | Printable)

Key: CORE-3670
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Lars Liedtke
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Wrong Timestamp conversion from client API

Created: 21/Nov/11 02:23 PM   Updated: 21/Nov/11 02:23 PM
Component/s: API / Client Library
Affects Version/s: 2.5.0
Fix Version/s: None

Environment: Ubuntu 10.04


 Description  « Hide
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;



 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.