boolean changeTZ = (newTz != null) && !newTz.equals(df.getTimeZone()); if (changeTZ) { df.setTimeZone(newTz);
boolean changeTZ = (newTz != null) && !newTz.equals(df.getTimeZone()); if (changeTZ) { df.setTimeZone(newTz);
/** * @return Returns the serverTimeZone used by this parser. */ public TimeZone getServerTimeZone() { return this.defaultDateFormat.getTimeZone(); } /**
@Override public TimeZone getTimeZone() { return parser.getTimeZone(); } }
public TimeZone getTimeZone() { return _tzFormat.getTimeZone(); }
boolean changeTZ = (newTz != null) && !newTz.equals(df.getTimeZone()); if (changeTZ) { df.setTimeZone(newTz);
protected long toEpoch(String datetime) throws ParseException { LOG.debug("Grok parser converting timestamp to epoch: {}", datetime); LOG.debug("Grok parser's DateFormat has TimeZone: {}", dateFormat.getTimeZone()); Date date = dateFormat.parse(datetime); LOG.debug("Grok parser converted timestamp to epoch: {}", date); return date.getTime(); }
@Override public void run() { try { ZonedDateTime now = ZonedDateTime.now(_fileDateFormat.getTimeZone().toZoneId()); RolloverFileOutputStream.this.setFile(now); RolloverFileOutputStream.this.removeOldFiles(now); RolloverFileOutputStream.this.scheduleNextRollover(now); } catch(Throwable t) { // Cannot log this exception to a LOG, as RolloverFOS can be used by logging t.printStackTrace(System.err); } } }
recentDateFormat.getDateFormatSymbols()); hackFormatter.setLenient(false); hackFormatter.setTimeZone(recentDateFormat.getTimeZone()); ParsePosition pp = new ParsePosition(0); parsed = hackFormatter.parse(timeStampStrPlusYear, pp);
/** * Get the timezone used for formatting conversions * * @return the timezone */ public TimeZone getTimeZone() { return simpleDateFormat.getTimeZone(); }
/** * Get the timezone used for formatting conversions * * @return the timezone */ public TimeZone getTimeZone() { return simpleDateFormat.getTimeZone(); }
/** * Get the timezone used for formatting conversions * * @return the timezone */ public TimeZone getTimeZone() { return simpleDateFormat.getTimeZone(); }
/** * @return Returns the serverTimeZone used by this parser. */ public TimeZone getServerTimeZone() { return this.defaultDateFormat.getTimeZone(); } /**
/** * Get the timezone used for formatting conversions * * @return the timezone */ public TimeZone getTimeZone() { return simpleDateFormat.getTimeZone(); }
/** * Get the timezone used for formatting conversions * * @return the timezone */ public TimeZone getTimeZone() { return simpleDateFormat.getTimeZone(); }
/** * Get the timezone used for formatting conversions. * * @return the timezone */ public TimeZone getTimeZone() { return simpleDateFormat.getTimeZone(); }
/** * @return Returns the serverTimeZone used by this parser. */ public TimeZone getServerTimeZone() { return this.defaultDateFormat.getTimeZone(); } /**
/** * Get the timezone used for formatting conversions * * @return the timezone */ public TimeZone getTimeZone() { return simpleDateFormat.getTimeZone(); }
/** * @return Returns the serverTimeZone used by this parser. */ public TimeZone getServerTimeZone() { return this.defaultDateFormat.getTimeZone(); } /**
@Before public void setUp() throws ParseException { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.US); dateFormat.setTimeZone(SDF.getTimeZone()); currentTime = dateFormat.parse("2018-07-11 12:30").getTime(); recomputeRolloverThreshold(currentTime); }