harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Luht" <anton.l...@gmail.com>
Subject Re: [classlib][sql] Another confusing behavior: java.sql.Timestamp
Date Tue, 29 Aug 2006 11:20:59 GMT
Hello,

I don't think we should bother about single value which is very
unlikely to happpen in real data.

On 8/29/06, Richard Liang <richard.liangyx@gmail.com> wrote:
> Hello All,
>
> RI's  java.sql.Timestamp(long time)  behaves confusing when the
> parameter time is in  Long.MIN_VALUE. Shall we follow RI?
>
> Output of the following sample is:
> time: -9223372036854775808
> time: 9223372036854775192
> timestamp: 292278994-08-17 15:12:55.192
> timestamp: 292278994-08-17 15:12:55.192
>
>
> =========================================
> import java.sql.Timestamp;
>
> public class TimeStampTest {
>    public static void main(String[] args) {
>        long time = Long.MIN_VALUE;
>        long time2 = 9223372036854775192l;
>        Timestamp timestamp = new Timestamp(time);
>        Timestamp timestamp2 = new Timestamp(time2);
>
>        System.out.println("time: " + time);
>        System.out.println("time: " + time2);
>
>        System.out.println("timestamp: " + timestamp);
>        System.out.println("timestamp: " + timestamp2);
>    }
> }
>
>
> --
> Richard Liang
> China Software Development Lab, IBM
>
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Regards,
Anton Luht,
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message