summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/isode')
-rw-r--r--src/com/isode/stroke/base/DateTime.java17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/com/isode/stroke/base/DateTime.java b/src/com/isode/stroke/base/DateTime.java
index 5f22cc3..8a8e31a 100644
--- a/src/com/isode/stroke/base/DateTime.java
+++ b/src/com/isode/stroke/base/DateTime.java
@@ -1,12 +1,7 @@
/*
-* Copyright (c) 2014 Kevin Smith and Remko Tronçon
-* All rights reserved.
-*/
-
-/*
-* Copyright (c) 2014, Isode Limited, London, England.
-* All rights reserved.
-*/
+ * Copyright (c) 2014-2015, Isode Limited, London, England.
+ * All rights reserved.
+ */
package com.isode.stroke.base;
@@ -19,7 +14,7 @@ import java.util.TimeZone;
public class DateTime {
public static Date stringToDate(String date) {
SimpleDateFormat parser = new SimpleDateFormat(format, Locale.US);
- parser.setTimeZone(TimeZone.getTimeZone("UTC"));
+ parser.setTimeZone(TimeZone.getTimeZone("UTC"));
try {
return parser.parse(date);
} catch (ParseException e) {
@@ -29,9 +24,9 @@ public class DateTime {
public static String dateToString(Date date) {
SimpleDateFormat parser = new SimpleDateFormat(format, Locale.US);
- parser.setTimeZone(TimeZone.getTimeZone("UTC"));
+ parser.setTimeZone(TimeZone.getTimeZone("UTC"));
return parser.format(date);
}
-
+
static private String format = "yyyy-MM-dd'T'HH:mm:ss'Z'";
}