All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.vectorpublish.desktop.vp.api.PlainDateFormat Maven / Gradle / Ivy

package net.vectorpublish.desktop.vp.api;

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

public class PlainDateFormat extends SimpleDateFormat {
	public static final TimeZone NO_TIMEZONE = new TimeZone() {
		@Override
		public boolean useDaylightTime() {
			return false;
		}

		@Override
		public void setRawOffset(int offsetMillis) {
		}

		@Override
		public boolean inDaylightTime(Date date) {
			return false;
		}

		@Override
		public int getRawOffset() {
			return 0;
		}

		@Override
		public int getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds) {
			return 0;
		}
	};

	public PlainDateFormat(String format) {
		super(format);
		GregorianCalendar newCalendar = new GregorianCalendar();

		newCalendar.setTimeZone(NO_TIMEZONE);
		setCalendar(newCalendar);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy