That's correct though, isn't it? If I'm a user in CST and I access
your app on 4/30 at 9PM, I'd probably be wondering "How could my LAST
billing date be 5/1, which isn't until tomorrow?"
But if that's what you want, you can add the timezone offset to the
date being formatted. If item.lastBillingDate is Date object,
return df.format( new Date( item.lastBillingDate.getTime() +
item.lastBillingDate.getTimezoneOffset()*60000 ) );
Your Java code should be returning a date in UTC. If it isn't,
you'll have to adjust for that offset as well.
--- In [EMAIL PROTECTED], "Dimitrios Gianninas"
<[EMAIL PROTECTED]> wrote:
>
> Just wondering if anyone experienced this, but we have a VO coming
from Java that contains a date field. Well I format the field using
the coe below:
>
> <mx:DateFormatter id="df" formatString="YYYY-MM-DD" />
>
> private function displayLastBillingDate( item:Object,
column:DataGridColumn ):String {
>
> return df.format( item.lastBillingDate );
>
> }
>
> And what happens is that this code works almost to well. It takes
into account the end-users PC timezone! So the date coming back from
the server is 2007-05-01 00:00:00, so for someone in EST it shows
properly as 2007-05-01 (cause we are in EST) but for someone in CST
is shows 2007-04-30... anything we can do about this? How do I get
the end-user timezone setting ?
>
> Dimitrios Gianninas
> Developer
> Optimal Payments Inc.
>
>
> --
> WARNING
> -------
> This electronic message and its attachments may contain
confidential, proprietary or legally privileged information, which is
solely for the use of the intended recipient. No privilege or other
rights are waived by any unintended transmission or unauthorized
retransmission of this message. If you are not the intended
recipient of this message, or if you have received it in error, you
should immediately stop reading this message and delete it and all
attachments from your system. The reading, distribution, copying or
other use of this message or its attachments by unintended recipients
is unauthorized and may be unlawful. If you have received this e-
mail in error, please notify the sender.
>
> AVIS IMPORTANT
> --------------
> Ce message électronique et ses pièces jointes peuvent contenir des
renseignements confidentiels, exclusifs ou légalement privilégiés
destinés au seul usage du destinataire visé. L'expéditeur original
ne renonce à aucun privilège ou à aucun autre droit si le présent
message a été transmis involontairement ou s'il est retransmis sans
son autorisation. Si vous n'êtes pas le destinataire visé du présent
message ou si vous l'avez reçu par erreur, veuillez cesser
immédiatement de le lire et le supprimer, ainsi que toutes ses pièces
jointes, de votre système. La lecture, la distribution, la copie ou
tout autre usage du présent message ou de ses pièces jointes par des
personnes autres que le destinataire visé ne sont pas autorisés et
pourraient être illégaux. Si vous avez reçu ce courrier électronique
par erreur, veuillez en aviser l'expéditeur.
>