package backend.utils;

import com.liferay.petra.string.StringPool;
import com.liferay.portal.kernel.util.DateFormatFactoryUtil;
import com.liferay.portal.kernel.util.TimeZoneUtil;
import com.liferay.portal.kernel.util.Validator;

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

/**
 * @author binhth
 * DateTimeUtils.class
 */
public class APIDateTimeUtils {

	public static final String _TIMESTAMP = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";

	public static String convertDateToString(Date date, String pattern) {
		DateFormat dateFormat = DateFormatFactoryUtil.getSimpleDateFormat(
			pattern);

		if (Validator.isNull(date) || Validator.isNull(pattern)) {
			return StringPool.BLANK;
		}

		dateFormat.setTimeZone(TimeZoneUtil.getTimeZone("Asia/Ho_Chi_Minh"));

		Calendar calendar = Calendar.getInstance();

		calendar.setTime(date);

		return dateFormat.format(calendar.getTime());
	}

//	private static Log _log = LogFactoryUtil.getLog(APIDateTimeUtils.class);

}
@@ -459,16 +459,80 @@
 SS'Z'%22;%0A
+%09public static final String HCM_TIMEZONE = %22Asia/Ho_Chi_Minh%22;%0A%09
 %0A%09public
@@ -822,34 +822,28 @@
 imeZone(
-%22Asia/Ho_Chi_Minh%22
+HCM_TIMEZONE
 ));%0A%0A%09%09C

Update auth security