• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Timezones and daylight savings

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yesterday (Sunday) I had to rush into the office to trouble shoot a problem at a client site. Whenever they tried to save a record they would get a message saying that the record was locked (by them) and you can't save.

I tracked it down to our locking logic. We get the date/time the user locks the record and store it in the database. Then send that value as a hidden on the page. When the page get's resubmitted we compare to make sure the timestamp wasn't changed. What I saw was that the Calendar converted from this string was an hour ahead.

On the clents web servers we turned off the Windows feature "Automatically adjust clock for daylight savings" and the client was able to work.

I'd like to fix this in code and here is my solution. Is this a valid approach?

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic