package ${package};

import java.text.DateFormat;
import java.util.Date;
import java.util.TimeZone;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class HelloWorldEnglish implements HelloWorld{

	private static final Logger log = LoggerFactory.getLogger(HelloWorldEnglish.class);	
	
	private String timeZone = "America/New_York";
	private String suffix = "Good day.";

	public HelloWorldEnglish() {
	}
	
	public String greet(String name) {
		Date today = new Date();
		DateFormat df = DateFormat.getDateTimeInstance();
		df.setTimeZone(TimeZone.getTimeZone(timeZone));
		String result = "Hello " + name + " time in " + timeZone + " is " + df.format(today) + ".  " + suffix;
		log.info(this.getClass().getName() + ".greet: " + result);
		return result;
	}

	public String getSuffix() {
		return suffix;
	}

	public void setSuffix(String suffix) {
		this.suffix = suffix;
	}

	public String getTimeZone() {
		return timeZone;
	}

	public void setTimeZone(String timeZone) {
		this.timeZone = timeZone;
	}

}
