You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by bu...@apache.org on 2005/04/22 20:11:02 UTC
DO NOT REPLY [Bug 34583] New: -
httpclient-dev@jakarta.apache.org
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=34583
Summary: httpclient-dev@jakarta.apache.org
Product: HttpClient
Version: 3.0 RC2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Commons HttpClient
AssignedTo: httpclient-dev@jakarta.apache.org
ReportedBy: fred.bierhaus@vodafone.com
DateUtil.formatDate() uses default timezone instead of GMT. In section 3.3.1,
RFC 2616 states: "All HTTP date/time stamps MUST be represented in Greenwich
Mean Time (GMT), without exception."
To reproduce, run the following snippet:
public static void main(String[] args) {
TimeZone tz = TimeZone.getTimeZone("GMT");
GregorianCalendar gc = new GregorianCalendar(tz);
gc.set(1900 + 104, GregorianCalendar.JANUARY, 1, 0, 0, 0);
System.out.println(DateUtil.formatDate(gc.getTime()));
}
Expected result:
Thu, 01 Jan 2004 00:00:00 GMT
Actual result (if your default timezone is PST):
Wed, 31 Dec 2003 16:00:00 PST
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org