The Date class can you give the timezone offset (http://livedocs.macromedia.com/flex/15/flex_docs_en/00001305.htm) and you could then use that to figure out how to write your timezone.  We don’t have anything built into the formatter but you could extend the formatter, call super.format(…) and then append the timezone yourself.  Of course it will be easier to do it using GMT+8 or GMT-5 for example, otherwise you’ll need to have some form of map that takes the minutes and produces EST, PST (or EDT/PDT if you’re dealing with daylight savings time).

 

Matt

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of javawebgrrl
Sent: Monday, June 13, 2005 8:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How do I show time zone with DateFormatter

 

I have used the DateFormatter, but unfortunately cannot seem to get it
to work as I like. I have declared it in my action script as follows:

dateTimeFormatter = new DateFormatter("DD MMM YYYY @ LL:NN " );

My problem is, I would also like to show the time zone, for example,
GMT or PST. I cannot seem to find the format string that would do
this. Has anyone shown the timezone with a dateformatter?
Thanks.

My date is displayed as
01 Jun 2005 @ 10:05

I want it to be
01 Jun 2005 @ 10:05 AM EST

Any tips ?
Thanks!





Yahoo! Groups Links

Reply via email to