package com.bwssystems.HABridge.api.hue;

import java.text.SimpleDateFormat;
import java.util.Date;

public class WhitelistEntry
{
	private String lastUseDate;
	private String createDate;
	private String name;
    private static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");

	public static WhitelistEntry createEntry(String devicetype) {
		WhitelistEntry anEntry = new WhitelistEntry();
		anEntry.setName(devicetype);
		anEntry.setCreateDate(getCurrentDate());
		anEntry.setLastUseDate(getCurrentDate());
		return anEntry;
	}
	
	 public static String getCurrentDate() {
		 return dateFormat.format(new Date());
	 }
	
	public String getLastUseDate() {
		return lastUseDate;
	}

	public void setLastUseDate(String lastUseDate) {
		this.lastUseDate = lastUseDate;
	}

	public String getCreateDate() {
		return createDate;
	}

	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}

@@ -52,28 +52,25 @@
 va.t
-ext.SimpleDateFormat
+ime.LocalDateTime
 ;%0Aim
@@ -83,17 +83,37 @@
 ava.
-u
 ti
-l.Date
+me.format.DateTimeFormatter
 ;%0A%0Ap
@@ -224,12 +224,9 @@
 me;%0A
-    
+%09
 priv
@@ -240,29 +240,40 @@
 tic 
-SimpleDat
+final DateTim
 eFormat
+ter
  date
+Time
 Form
@@ -281,28 +281,35 @@
 t = 
-new SimpleDateFormat
+DateTimeFormatter.ofPattern
 (%22yy
@@ -586,17 +586,16 @@
 ;%0A%09%7D%0A%09%0A%09
- 
 public s
@@ -632,49 +632,60 @@
 %7B%0A%09%09
- 
 return 
-dateFormat.format(new Date()
+LocalDateTime.now().format(dateTimeFormat
 );%0A%09
- 
 %7D%0A%09%0A

Call to method of static java.text.DateFormat in com.bwssystems.HABridge.api.hue.WhitelistEntry.getCurrentDate()