This discussion is archived
8 Replies Latest reply: Jan 30, 2013 12:23 AM by garcol RSS

application time is changed (1 hour later)

garcol Newbie
Currently Being Moderated
I noticed that the time in my application is changed one hour?
This is very critical because user can only fill in data in a selected time window.

How is this possible? I have not changed anything?

Edited by: garcol on 4-dec-2012 11:39
  • 1. Re: application time is change (1 hour later)
    jariola Guru
    Currently Being Moderated
    Hi,

    Without any other details I propose check your server time.
    Do you use TIMESTAMP or DATE format?

    Regards,
    Jari
    -----
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai
  • 2. Re: application time is changed (1 hour later)
    garcol Newbie
    Currently Being Moderated
    I use current_timestamp and a date column in my table with format dd-mm-yyyy hh24:mi (04-12-2012 20:45)

    It seems that it is solved now. Everything is back to normal. Could it be user-specific?
  • 3. Re: application time is changed (1 hour later)
    jariola Guru
    Currently Being Moderated
    Hi,

    Date column do not store timezone. I think that might cause problem.
    See also
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/bldr_attr.htm#sthref740

    Regards,
    Jari
    -----
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai
  • 4. Re: application time is changed (1 hour later)
    garcol Newbie
    Currently Being Moderated
    Hm.
    I still think it is something else.

    For 6 months it works perfectly, and then all of a sudden, the time is set one hour forward, and an hour later the time is normal again...

    This is the code which fills a hidden field on my form with Y or N. The datum_einde is a date field, which is filled with a date and time.
        select 1
        from   rondes rde
        where rde.datum_einde < current_timestamp
        and    rde.id = b_rde_id
        ;
  • 5. Re: application time is changed (1 hour later)
    B.Delmée Explorer
    Currently Being Moderated
     For 6 months it works perfectly, and then all of a sudden, the time is set one hour forward, and an hour later the time is normal again...
    This very much smells like what oracle calls the "boundary case" in its documentation wrt Daylight Saving Time


    Also, if your db column is of DATE type, oracle will cast it to the more accurate TIMESTAMP type on the right-hand-side of your time condition, hence will not be able to use an index on the datum_einde column...
  • 6. Re: application time is changed (1 hour later)
    garcol Newbie
    Currently Being Moderated
    Hello,


    But I do not know how to solve this, the problem is, the time in my online application is 1 hour later than is actually is. So 21.30is actually 20.30.

    This is my code:
    select 1
        from   vex_rondes rde
        where rde.datum_einde < current_timestamp
        and    rde.id = b_rde_id
    rde.datum_einde is a date column filled with dates of course ins this format: 10-01-2013 20:45 (10th January 2013 20h45)

    How can I get this current_timestamp correct?

    this helps:
    select 1
        from   vex_rondes rde
        where rde.datum_einde+(1/24) < current_timestamp
        and    rde.id = b_rde_id
    but that's not very elegant nor generic...

    Main thing is that the servers or database time is not correct...

    Edited by: garcol on Jan 28, 2013 9:44 PM

    Edited by: garcol on Jan 28, 2013 9:45 PM
  • 7. Re: application time is changed (1 hour later)
    Howard (... in Training) Pro
    Currently Being Moderated
    A few thoughts.

    1) I don't know of anyone who changes time (ST to DST or back) in December so I'm ruling that out.
    2) But the time on the server(s) could have inadvertently been changed by someone -- especially if patches were applied. So you might see what patch activity occurred on your server just before you noticed this -- i.e., late November to early December.
    3) Are you and the users and the server(s) in the same time zone?

    Best wishes,
    Howard
  • 8. Re: application time is changed (1 hour later)
    garcol Newbie
    Currently Being Moderated
    It seems that I have found it.

    After struggling an evening I have found out that it works fine in Internet Explorer, not in Firefox (it seems that Firefox has a caching problem)...

    Fanally: In the tab Edit Globalization Attributes (via Application properties) I have set the field 'Application primary language' to 'Dutch (nl)' (this was 'English (en)', and the time is OK now (it took a while when it works in Firefox though...) This seems to make sense because in the UK it's one our earlier?

    It seems Ok now, can anyone confirm that this could be the solution?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points