File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
java/src/org/openqa/selenium Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 22
22
import java .util .Date ;
23
23
import java .util .Map ;
24
24
import java .util .Objects ;
25
+ import java .util .TimeZone ;
25
26
import java .util .TreeMap ;
26
27
27
28
public class Cookie implements Serializable {
@@ -255,12 +256,12 @@ public Map<String, Object> toJson() {
255
256
256
257
@ Override
257
258
public String toString () {
259
+ SimpleDateFormat sdf = new SimpleDateFormat ("EEE, dd MMM yyyy HH:mm:ss z" );
260
+ sdf .setTimeZone (TimeZone .getTimeZone ("GMT" ));
258
261
return name
259
262
+ "="
260
263
+ value
261
- + (expiry == null
262
- ? ""
263
- : "; expires=" + new SimpleDateFormat ("EEE, dd MMM yyyy hh:mm:ss z" ).format (expiry ))
264
+ + (expiry == null ? "" : "; expires=" + sdf .format (expiry ))
264
265
+ ("" .equals (path ) ? "" : "; path=" + path )
265
266
+ (domain == null ? "" : "; domain=" + domain )
266
267
+ (isSecure ? ";secure;" : "" )
You can’t perform that action at this time.
0 commit comments