Fixed test failure on non-english Locale systems

Contributed by Daniel Müller <strider at digitalstrider.com>

git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@545908 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2007-06-10 16:41:44 +00:00
parent 0d962274e7
commit ecefd447fd

View File

@ -33,6 +33,7 @@
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.Locale;
import junit.framework.Test; import junit.framework.Test;
import junit.framework.TestCase; import junit.framework.TestCase;
@ -421,7 +422,7 @@ public void testBasicExpiresParse() throws Exception {
Cookie cookie = new Cookie("name", "value"); Cookie cookie = new Cookie("name", "value");
CookieAttributeHandler h = new BasicExpiresHandler(new String[] {DateUtils.PATTERN_RFC1123}); CookieAttributeHandler h = new BasicExpiresHandler(new String[] {DateUtils.PATTERN_RFC1123});
DateFormat dateformat = new SimpleDateFormat(DateUtils.PATTERN_RFC1123); DateFormat dateformat = new SimpleDateFormat(DateUtils.PATTERN_RFC1123, Locale.US);
dateformat.setTimeZone(DateUtils.GMT); dateformat.setTimeZone(DateUtils.GMT);
Date now = new Date(); Date now = new Date();