AAI-1523 Batch reformat aai-core
[aai/aai-common.git] / aai-core / src / main / java / org / onap / aai / util / FormatDate.java
index 77e39f7..9ee2b71 100644 (file)
@@ -17,6 +17,7 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
+
 package org.onap.aai.util;
 
 import java.time.ZoneId;
@@ -25,21 +26,22 @@ import java.time.format.DateTimeFormatter;
 
 public class FormatDate {
 
-       private final String timeZone;
-       private final String pattern;
-       public FormatDate(String pattern) {
-               this.pattern = pattern;
-               this.timeZone = "GMT";
-       }
-       public FormatDate(String pattern, String timeZone) {
-               this.pattern = pattern;
-               this.timeZone = timeZone;
-       }
-       
-       public String getDateTime() {
-               
-               final DateTimeFormatter formatter =
-                               DateTimeFormatter.ofPattern(pattern);
-               return formatter.format(ZonedDateTime.now(ZoneId.of(timeZone)));
-       }
+    private final String timeZone;
+    private final String pattern;
+
+    public FormatDate(String pattern) {
+        this.pattern = pattern;
+        this.timeZone = "GMT";
+    }
+
+    public FormatDate(String pattern, String timeZone) {
+        this.pattern = pattern;
+        this.timeZone = timeZone;
+    }
+
+    public String getDateTime() {
+
+        final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
+        return formatter.format(ZonedDateTime.now(ZoneId.of(timeZone)));
+    }
 }