package com.vaadin.tests.serialization;
+import java.text.DateFormat;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
+import java.util.TimeZone;
import com.vaadin.annotations.Widgetset;
import com.vaadin.server.VaadinRequest;
@Override
public void sendDate(Date date) {
- log.log("sendDate: " + date.toString());
+ DateFormat format = DateFormat.getDateTimeInstance(
+ DateFormat.LONG, DateFormat.FULL,
+ new Locale("en", "fi"));
+ format.setTimeZone(TimeZone.getTimeZone("UTC"));
+ log.log("sendDate: " + format.format(date));
}
});
openTestURL();
int logRow = 0;
- Assert.assertEquals("sendDate: Fri May 31 11:12:13 CEST 2013",
+ Assert.assertEquals("sendDate: May 31, 2013 8:12:13 AM UTC",
getLogRow(logRow++));
- Assert.assertEquals("sendDate: Thu Jan 01 01:00:00 CET 1970",
+ Assert.assertEquals("sendDate: January 1, 1970 12:00:00 AM UTC",
getLogRow(logRow++));
Assert.assertEquals(
"sendEnum: PREFORMATTED, [HTML, RAW], [PREFORMATTED, XML]",