aboutsummaryrefslogtreecommitdiffstats
path: root/src/scratchpad/testcases/org/apache
diff options
context:
space:
mode:
Diffstat (limited to 'src/scratchpad/testcases/org/apache')
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hmef/TestAttachments.java5
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java5
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java5
3 files changed, 6 insertions, 9 deletions
diff --git a/src/scratchpad/testcases/org/apache/poi/hmef/TestAttachments.java b/src/scratchpad/testcases/org/apache/poi/hmef/TestAttachments.java
index 18f59725bb..87655cb3ae 100644
--- a/src/scratchpad/testcases/org/apache/poi/hmef/TestAttachments.java
+++ b/src/scratchpad/testcases/org/apache/poi/hmef/TestAttachments.java
@@ -18,6 +18,7 @@
package org.apache.poi.hmef;
import java.text.DateFormat;
+import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Locale;
@@ -83,9 +84,7 @@ public final class TestAttachments extends HMEFTest {
List<Attachment> attachments = quick.getAttachments();
// Pick a predictable date format + timezone
- DateFormat fmt = DateFormat.getDateTimeInstance(
- DateFormat.MEDIUM, DateFormat.MEDIUM, Locale.UK
- );
+ DateFormat fmt = new SimpleDateFormat("dd-MMM-yyyy hh:mm:ss", Locale.UK);
fmt.setTimeZone(LocaleUtil.TIMEZONE_UTC);
// They should all have the same date on them
diff --git a/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java b/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java
index f854394816..7fcad02042 100644
--- a/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java
+++ b/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java
@@ -20,6 +20,7 @@ package org.apache.poi.hmef.attribute;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.text.DateFormat;
+import java.text.SimpleDateFormat;
import java.util.Locale;
import org.apache.poi.POIDataSamples;
@@ -159,9 +160,7 @@ protected void tearDown() throws Exception {
assertEquals(MAPIDateAttribute.class, attr.getClass());
MAPIDateAttribute date = (MAPIDateAttribute)attr;
- DateFormat fmt = DateFormat.getDateTimeInstance(
- DateFormat.MEDIUM, DateFormat.MEDIUM, Locale.UK
- );
+ DateFormat fmt = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss", Locale.UK);
fmt.setTimeZone(LocaleUtil.TIMEZONE_UTC);
assertEquals("15-Dec-2010 14:46:31", fmt.format(date.getDate()));
diff --git a/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java b/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java
index cd13b94b39..04004fae23 100644
--- a/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java
+++ b/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java
@@ -19,6 +19,7 @@ package org.apache.poi.hmef.attribute;
import java.io.ByteArrayInputStream;
import java.text.DateFormat;
+import java.text.SimpleDateFormat;
import java.util.Locale;
import org.apache.poi.POIDataSamples;
@@ -159,9 +160,7 @@ public final class TestTNEFAttributes extends TestCase {
// Ask for it as a Java date, and have it converted
// Pick a predictable format + location + timezone
TNEFDateAttribute date = (TNEFDateAttribute)attr;
- DateFormat fmt = DateFormat.getDateTimeInstance(
- DateFormat.MEDIUM, DateFormat.MEDIUM, Locale.UK
- );
+ DateFormat fmt = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss", Locale.UK);
fmt.setTimeZone(LocaleUtil.TIMEZONE_UTC);
assertEquals("28-Apr-2010 12:40:56", fmt.format(date.getDate()));
}