Riaan Oberholzer wrote:

Actually....

<fmt:formatDate value="${row.TIME}"
timeZone="<%= Constants.TIMEZONE %>" pattern="dd-MM-yyyy 'at' HH:mm"/>


does not work

<fmt:formatDate value="${row.TIME}"
timeZone="Europe/London" pattern="dd-MM-yyyy 'at' HH:mm"/>


does !!!
( Constants.TIMEZONE  = ="Europe/London")

So the java scriplet <%= xxx %> is not allowed?

It depends. If you're on a JSP 2.0 container (JSTL 1.1), then this works.
It won't on a JSP 1.2 container (JSTL 1.0).


In JSTL 1.0, you need to use the RT libraries to use rtexprvalues. See the spec for details.

-- Pierre

--- Martin van Dijken <[EMAIL PROTECTED]> wrote:

Try:

<fmt:setLocale value="nl_NL"/>
<fmt:formatDate value="${obj}"
timeZone="Europe/London" type="time"/>

Or:

<fmt:setLocale value="en_GB"/>
<fmt:formatDate value="${obj}"
timeZone="Europe/London" type="time"/>

It might be that this actually changes something.
Personally I've found
the whole Locale business very confusing and
illogical to work with, but
that's just my personal frustration.

Martin


-----Original Message-----
From: Riaan Oberholzer

[mailto:[EMAIL PROTECTED]


Sent: woensdag 25 februari 2004 10:48
To: Tag Libraries Users List
Subject: RE: JSTL <fmt:formatDate bug ???


I'm a bit lost here.... can you give me an example

of


what I should give to jstl to print the time as
"Europe/London" ?

Thanks

Charl


--- Martin van Dijken <[EMAIL PROTECTED]>

wrote:


Hey Riaan,

Try fiddling around with setting the locale in

JSTL.


In your example
code you create a SimpleDateFormat with a

pattern as argument. JSTL


uses the constructor with a Locale as additional
parameter.

Grtz,

Martin


-----Original Message-----
From: Riaan Oberholzer

[mailto:[EMAIL PROTECTED]


Sent: woensdag 25 februari 2004 8:18
To: Tag Libraries Users List
Subject: RE: JSTL <fmt:formatDate bug ???



Could you post the code to manually format

the


date?

I can easily compare that to what is being

done


by

the JSTL implementation and give you some

feedback


on that.

Something to the extend of:


static
{
SimpleDateFormatter sdf = new
SimpleDateFormatter("yyyy-MM-dd HH:mm");



sdf.setTimeZone(TimeZone.getTimeZone("Europe/London");

}

user inputs time in above format in jsp, then

I


do:

sdf.parseDate(inputtedDate) and do a getTime

and


then

create a java.sql.Timestamp with the long

value


and

put that in the DB. Mysql displays is as one

hour


later, the Dutch time, which is expected.

When displaying it manually, I use the same

sdf


above

and do something like:

sdf.formatDate(new

Date(resultSet.getTimestamp("time").getTime())).


Not 100% sure, as I do not have the code with

me,


but

somthing to this extend. The sdf is a static

in a


singleton utility class.

And, as I said, it only gets messed up after

DST


kicks

in. Maybe "Europe/London" is somehow (wrongly)
interpreted as GMT?


PS Thanks for hosting your application in

our


fine

little country:)

I live here, but I'm not Dutch. :)




__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you

want. http://antispam.yahoo.com/tools



---------------------------------------------------------------------

To unsubscribe, e-mail:

[EMAIL PROTECTED]


For additional commands, e-mail:
[EMAIL PROTECTED]





---------------------------------------------------------------------

To unsubscribe, e-mail:

[EMAIL PROTECTED]


For additional commands, e-mail:
[EMAIL PROTECTED]



__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you

want. http://antispam.yahoo.com/tools




---------------------------------------------------------------------


To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]





---------------------------------------------------------------------


To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]




__________________________________ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to