-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

jie tang,

On 2/14/2011 4:57 AM, Mark Thomas wrote:
> On 14/02/2011 05:38, jie tang wrote:
>> I place a directory in Tomcat webapps directory. I want to Tomcat list files
>> under the directory.
>> When I browse the file list in my browser, the file list looks like the
>> following
>>
>>    2011-02-12_r5384_1669/       Sat, 12 Feb 2011 09:40:44 GMT
>>
>> But what I need is
>>    2011-02-12_r5384_1669/       Sat, 12 Feb 2011 17:40:44 GMT + 08
>>
>> When I type the command "date",it shows
>>    Mon Feb 14 13:33:45 CST 2011
>> And I added the following statement to catalina.sh
>>    -Duser.timezone=GMT+08 \
>>
>> So what should I do to get what I need?
> 
> You'll need to modify/extend the DefaultServlet to check the user's
> Locale and determine the timezone from that.

Note that changing the display to show a date in a certain timezone is
trivial (just call DateFormat.setTimeZone, though that's a shared object
and will need to be un-shared to do this correctly) but determining
which time zone to use is non-trivial.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1atwoACgkQ9CaO5/Lv0PBxIwCghejr+Jsx1L9mCiQ99RWSFK8r
580An1XIQQsZyk/5Qo8IAZD2VaHwueVB
=5Sa6
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to