ken sims

Greenhorn
+ Follow
since Nov 18, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ken sims

Thanks so much for the info. Setting the TimeZone on the formatter did the trick!
18 years ago
I have a Date object being serialized from a server to a client (located in two different timezones) and I noticed that the date gets auto-adjusted to reflect the local timezone. There are places in the client app where this is desired; however, there are places where I need to keep the date based on the server's timezone. Basically, I don't want certain date objects to auto-adjust.

I noticed that you can set the client's timezone to the server's by calling this:
TimeZone.setDefault(serverTimeZone);

The problem with this approach is that it globally applies this for all Date objects and I only need it applied for a select few. Is there a easy way around this? Do I need to create a subclass of Date or is there something I'm overlooking?

Thanks...
18 years ago