Fixed time zone specific test case

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@919424 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2010-03-05 14:08:56 +00:00
parent bafc57ec16
commit cb693cae40
1 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,7 @@ package org.apache.http.impl.cookie;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.TimeZone;
import junit.framework.Test;
import junit.framework.TestCase;
@ -188,6 +189,7 @@ public class TestCookieNetscapeDraft extends TestCase {
assertEquals(1, cookies.size());
Cookie cookie = cookies.get(0);
Calendar c = Calendar.getInstance();
c.setTimeZone(TimeZone.getTimeZone("GMT"));
c.setTime(cookie.getExpiryDate());
int year = c.get(Calendar.YEAR);
assertEquals(2070, year);