001/*
002 * Ganymede Kernel Rest Protocol
003 * Ganymede Kernel Rest Protocol
004 *
005 * The version of the OpenAPI document: 2.1.3
006 *
007 *
008 * NOTE: This class is auto generated by OpenAPI Generator
009 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
010 * the class manually.
011 */
012
013package ganymede.kernel.client;
014
015import com.fasterxml.jackson.databind.util.StdDateFormat;
016import java.text.DateFormat;
017import java.text.DecimalFormat;
018import java.text.FieldPosition;
019import java.text.ParsePosition;
020import java.util.Date;
021import java.util.GregorianCalendar;
022import java.util.TimeZone;
023
024@javax.annotation.
025Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen",
026          comments = "Generator version: 7.6.0")
027public class RFC3339DateFormat extends DateFormat {
028  private static final long serialVersionUID = 1L;
029  private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC");
030
031  private final StdDateFormat fmt =
032      new StdDateFormat().withTimeZone(TIMEZONE_Z).withColonInTimeZone(true);
033
034  public RFC3339DateFormat() {
035    this.calendar = new GregorianCalendar();
036    this.numberFormat = new DecimalFormat();
037  }
038
039  @Override
040  public Date parse(String source) {
041    return parse(source, new ParsePosition(0));
042  }
043
044  @Override
045  public Date parse(String source, ParsePosition pos) {
046    return fmt.parse(source, pos);
047  }
048
049  @Override
050  public StringBuffer format(Date date, StringBuffer toAppendTo,
051                             FieldPosition fieldPosition) {
052    return fmt.format(date, toAppendTo, fieldPosition);
053  }
054
055  @Override
056  public Object clone() {
057    return super.clone();
058  }
059}