java.sql.dat

Discussion in 'Java' started by Ike, Oct 23, 2003.

  1. Ike

    Ike Guest

    For some reason (perhaps because I am running this on Windows?) when I
    convert a string in yyyy-mm-dd format to a java.sql.Date, if it is before
    April 6, 2003, the value is saved as one day less than is designated in the
    String!

    For example:

    java.sql.Date.valueOf("2003-04-06")

    gets stored as a java.sql.Date object as "2003-04-05."

    Does anyone have any idea why this is happening, or any experience with such
    things happening to them? Thanks, Ike
     
    Ike, Oct 23, 2003
    #1
    1. Advertising

  2. "Ike" <> wrote in
    news:6rPlb.15482$:

    > For some reason (perhaps because I am running this on Windows?) when I
    > convert a string in yyyy-mm-dd format to a java.sql.Date, if it is
    > before April 6, 2003, the value is saved as one day less than is
    > designated in the String!
    >
    > For example:
    >
    > java.sql.Date.valueOf("2003-04-06")
    >
    > gets stored as a java.sql.Date object as "2003-04-05."
    >
    > Does anyone have any idea why this is happening, or any experience
    > with such things happening to them? Thanks, Ike



    Daylight Savings Time is doing this. 2003-04-06 at 0:00 is changing to
    2003-04-05 at 23:00.


    --
    -----BEGIN GEEK CODE BLOCK-----
    Version: 3.12
    GCS d++ s+:- a+ C+ UL++++ P+ L+ E- W+ N++ o- K++ w+ O+ M !V PS+ PE Y+ PGP
    t+ !5 X- R- tv--- b++ DI++ D+ G++ e++ h---- r+++ y+++
    ------END GEEK CODE BLOCK------
     
    Tris Orendorff, Oct 24, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jason Shohet

    what is index.dat in regards to cookies?

    Jason Shohet, May 12, 2004, in forum: ASP .Net
    Replies:
    8
    Views:
    591
    Jason Shohet
    May 13, 2004
  2. Arjen Jongeling

    Het zal toch niet zijn wie ik denk dat het is?

    Arjen Jongeling, Jun 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    351
    Richard
    Jun 17, 2004
  3. Replies:
    0
    Views:
    514
  4. =?Utf-8?B?U3JpZGhhcg==?=
    Replies:
    3
    Views:
    2,122
    n33470
    Dec 13, 2005
  5. MumHa
    Replies:
    1
    Views:
    341
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Feb 24, 2006
Loading...

Share This Page