aspose file tools*
The moose likes Java in General and the fly likes DateFormat for Apache Common Log Format date? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "DateFormat for Apache Common Log Format date?" Watch "DateFormat for Apache Common Log Format date?" New topic
Author

DateFormat for Apache Common Log Format date?

Chris Treglio
Ranch Hand

Joined: Jun 18, 2001
Posts: 64
Does anyone know of a DateFormat implementation designed to work with the date format Apache uses in its logs? The format looks like

The SimpleDateFormat with a format string like "dd/MMM/yyyy:hh:mm:ss z" sort of works, but the time zone offset doesn't parse right.
Bhagya Tangutur
Ranch Hand

Joined: Oct 21, 2002
Posts: 88
try Z instead of z.i guess it will work
the string will be "dd/MMM/yyyy:hh:mm:ss Z"
[ July 09, 2003: Message edited by: Kumar BT ]

Sun Certified Java Programmer
Chris Treglio
Ranch Hand

Joined: Jun 18, 2001
Posts: 64
can you post an example? all that gives me is a ParseException.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DateFormat for Apache Common Log Format date?