Hi Stephen,

Thanks for your reply, your solution worked!

Michael. 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stephen 
Colebourne
Sent: Thursday, June 28, 2007 7:45 PM
To: Discussion of the Joda project
Subject: Re: [Joda-interest] LocalDate problem: 1900-01-01 timestamp turnsinto 
1899-12-31

This is probably due to a mismatch between the timezone data of the
JDK and the timezone data of Joda-Time.

Please try using the static factory method on LocalDate,
fromDateFields(), instead of the constructor.

Stephen


On 27/06/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Can someone help me with the following problem:
> If I construct an sql Timestamp with date 1th of january 1900 and throw it
> into a LocalDate consturctor, it gives back the 31th of december 1899.
>
> The obvious question: why? Is this a bug?
>
> code to try out:
>         java.sql.Timestamp _1900_1_1 = new Timestamp(1900 -
> 1900,0,1,0,0,0,0);
>         LocalDate converted_1900_1_1 = new LocalDate(_1900_1_1);
>         System.out.println(_1900_1_1 + " vs " + converted_1900_1_1);
>
> thanks in advance,
>
> Michael Kinoo.
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Joda-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>
>
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest


= = = = = = = = = = = = = = = = = = = = = = = = =
Fortis disclaimer :
http://www.fortis.be/legal/disclaimer.htm

Privacy policy related to banking activities of Fortis:
http://www.fortis.be/legal/privacy_policy.htm
= = = = = = = = = = = = = = = = = = = = = = = = =




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to