Hi Jim,

Your problem appears to be half the problem that I am having.

In your case, the client requests (for record insertion of a date)
that is sent back to the server means that the server tries to
translate the time into it's local timezone.

Our problem inlcudes the above, plus any date object that the server
sends to the client also has the same problem. The client translates
the server sent date object into it's local timezone. 

In any case, the solutions are:

1. To do offsetting at the client end 
2. To do offsetting at the server end
3. To use custom defined object for date/time without any timezones.

#1 and #2 can be tricky if you have many places where the date object
is referenced. For example, you may miss some date references, you
need to check that every date object really does need offsetting,
there is overhead when doing offsetting, you need to test thoroughly
through all timezones just in case you there are some quirky side effects.

#3 may require significant refactoring of existing methods.

Some of the underlying issues are with the implementation of Date object:

1. In Flex (ActionScript), the Date object doesn't allow manual
setting of the timezone
2. In Java, the Date object is deprecated and harder to manage than a
Calendar object.

So as far as I know, there isn't a way of ignoring timezones when
using the Date object.

I assume that using remote objects and passing of the Flex Date object
as a parameter, we can only map the the Java Date object to it. It
would be nice to map a Java Calendar object instead.

Cheers,

Kam



--- In [email protected], Jim Laing <[EMAIL PROTECTED]> wrote:
>
> On 12/22/05, Matt Chotin <[EMAIL PROTECTED]> wrote:
> > Are there other developers out here who've been building apps that
need
> > to work in multiple timezones (or store their dates in GMT but work in
> > another)?  I know I've answered some issues before in the past, if
> > anyone wants to speak up ;-)
> 
> We have a similar but slightly different use-case (and unresolved
> problem, for that matter): Our clients will be all over the world and
> will be sending dates back to our database via RemoteObject calls.
> When the date object is serialized, Flex automatically takes care of
> updating the time zone information. However, this is actually *not*
> what we want to happen because we are sending back dates with 00:00:00
> timestamps (i.e. no time information). However, when this information
> crosses timezones during serialization, 00:00:00 becomes a time
> (midnight), which is then offset according to the timezone difference,
> and the date possibly becomes a day off. E.g. a date of 25-Dec-2005
> 00:00:00 GMT on the client becomes 24-Dec-2005 17:00:00 EST in the
> database. And those of us who celebrate Christmas know that 24-Dec !=
> 25-Dec
> 
> If there was a way that we could configure our clients to work in the
> same timezone as our server, then we'd be all set. Alternatively, if
> we could configure serialization to ignore timezone information then
> our dates wouldn't be corrupted. Maybe there is already an easy
> solution. I haven't had a chance to dig into the problem too much. But
> any suggestions are appreciated.
> 
> Jim
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to