Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problem with Calendar Control in java due to DST

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Our application s a Global application. Its App
server is in GMT +2.00 Timezone. and the client is in US &
Cannada time zone.

We are using a Java date control in
the application. When save particular date from Us its saving
as one day lesser than the date we selected.

Can anyone
help us with this issue.

Ajay
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, without more details it is difficult to help you solve the problem. What Java date control are you using? Is that something you wrote yourself or did you get it from somewhere else? Maybe there is a bug in the date control? Did you try asking the author of the date control if there's a known bug?

Are you saving the date that the user entered in a database or a file or in some other way? How does your application do that? Did you check if there is a bug in handling the date in your own code?
 
Ajay Joseph
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jesfer for the reply.

The problem is not happening in all locations..Its only happening in US timezone.

If it is a Bug in the code, It wil happen in all machine..

For eg. If we are able replicate with this timezone in one machine, In some machine with the same time zone settings we are not able to replicate.

The server patches are done in Application Server.
Is there some patches which we need to apply to the Client JREs.

The datas are stored in Oracle 9i DB.

Thanks n Regards
Ajay
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

If it is a Bug in the code, It wil happen in all machine..


That's not necessarily true - sometimes bugs only happen if certain conditions are met, for example if the date and time on the machine on which the software runs is set to a certain timezone.

Without knowing more details I can't say if the problem is in the date control, your own software or the JRE. It is possible that it's in the JRE - recently Sun released patches for certain versions of the JRE because some rules with regard to daylight savings have been changed.

For more info about those patches, have a look at this page: Timezone Data and the Java Runtime Environment
 
I found a beautiful pie. And a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic