hi,

we have tomcat 7.0.68 deployed on linux.

To capture the log in local system timezone using ExtendedAccessLogValve
class we change the following line
"currentTimestampFormat.setTimeZone(TimeZone.getTimeZone("GMT"))"

into
"currentTimestampFormat.setTimeZone(TimeZone.getDefault())"

in ElementTimestampStruct class and then compile and replace the
catalina.jar in already deployed tomcat.

Now , The time is sync with the system set time which is GMT+5 but somehow
date is still operating on GMT as date get changed at 05:00 AM ( system
time). please help me in this regard to understand why the above mentioned
change have no impact of date field.

Regards
Farhan

On Thu, Dec 15, 2016 at 3:31 AM, Konstantin Kolinko <knst.koli...@gmail.com>
wrote:

> 2016-12-14 18:48 GMT+03:00 Farhan Tariq <farhantar...@gmail.com>:
> > Hello team,
> >
> > I am not sure why the timezone is explicitly set to GMT in
> > ExtendedAccessLogValve class?
> > To capture URL encoded parameters I looking to use this class but need
> help
> > to get time in GMT+5. I am using tomcat 7 on redhat.
> > Any suggestions?
>
>
> 1. Please read the mailing list rules:
> http://tomcat.apache.org/lists.html#tomcat-users
>
> You have not mentioned what exact version of Tomcat you are using (1.)
>
> 2. Use of GMT in ExtendedAccessLogValve is by design.
>
> That valve implements log format specified by "Extended Log File
> Format" specification by W3C, and the specification dictates that the
> time is in GMT.
>
> http://tomcat.apache.org/tomcat-8.5-doc/config/valve.
> html#Extended_Access_Log_Valve
>
> https://www.w3.org/TR/WD-logfile.html
>
>
> It may be good to implement configurable timezone in AccessLogValve
> (currently it uses TimeZone.getDefault()), but I think that
> ExtendedAccessLogValve shall remain with GMT.
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to