java.text.SimpleDateFormat.getTimeZone()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(139)

本文整理了Java中java.text.SimpleDateFormat.getTimeZone()方法的一些代码示例,展示了SimpleDateFormat.getTimeZone()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SimpleDateFormat.getTimeZone()方法的具体详情如下:
包路径:java.text.SimpleDateFormat
类名称:SimpleDateFormat
方法名:getTimeZone

SimpleDateFormat.getTimeZone介绍

暂无

代码示例

代码示例来源:origin: prestodb/presto

boolean changeTZ = (newTz != null) && !newTz.equals(df.getTimeZone());
if (changeTZ) {
  df.setTimeZone(newTz);

代码示例来源:origin: redisson/redisson

boolean changeTZ = (newTz != null) && !newTz.equals(df.getTimeZone());
if (changeTZ) {
  df.setTimeZone(newTz);

代码示例来源:origin: commons-net/commons-net

/**
 * @return Returns the serverTimeZone used by this parser.
 */
public TimeZone getServerTimeZone() {
  return this.defaultDateFormat.getTimeZone();
}
/**

代码示例来源:origin: apache/phoenix

@Override
  public TimeZone getTimeZone() {
    return parser.getTimeZone();
  }
}

代码示例来源:origin: org.mortbay.jetty/jetty-util

public TimeZone getTimeZone()
{
  return _tzFormat.getTimeZone();
}

代码示例来源:origin: apache/drill

boolean changeTZ = (newTz != null) && !newTz.equals(df.getTimeZone());
if (changeTZ) {
  df.setTimeZone(newTz);

代码示例来源:origin: apache/metron

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();
}

代码示例来源:origin: org.eclipse.jetty/jetty-util

@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);
    }
  }
}

代码示例来源:origin: commons-net/commons-net

recentDateFormat.getDateFormatSymbols());
hackFormatter.setLenient(false);
hackFormatter.setTimeZone(recentDateFormat.getTimeZone());
ParsePosition pp = new ParsePosition(0);
parsed = hackFormatter.parse(timeStampStrPlusYear, pp);

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * Get the timezone used for formatting conversions
 *
 * @return the timezone
 */
public TimeZone getTimeZone() {
  return simpleDateFormat.getTimeZone();
}

代码示例来源:origin: jboss.web/jbossweb

/**
 * Get the timezone used for formatting conversions
 *
 * @return the timezone
 */
public TimeZone getTimeZone() {
  return simpleDateFormat.getTimeZone();
}

代码示例来源:origin: org.glassfish.main.web/web-core

/**
 * Get the timezone used for formatting conversions
 *
 * @return the timezone
 */
public TimeZone getTimeZone() {
  return simpleDateFormat.getTimeZone();
}

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.net

/**
 * @return Returns the serverTimeZone used by this parser.
 */
public TimeZone getServerTimeZone() {
  return this.defaultDateFormat.getTimeZone();
}
/**

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Get the timezone used for formatting conversions
 *
 * @return the timezone
 */
public TimeZone getTimeZone() {
  return simpleDateFormat.getTimeZone();
}

代码示例来源:origin: tomcat/catalina-optional

/**
 * Get the timezone used for formatting conversions
 *
 * @return the timezone
 */
public TimeZone getTimeZone() {
  return simpleDateFormat.getTimeZone();
}

代码示例来源:origin: org.apache.tapestry/tapestry-framework

/**
 * Get the timezone used for formatting conversions.
 * 
 * @return the timezone
 */
public TimeZone getTimeZone()
{
  return simpleDateFormat.getTimeZone();
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

/**
 * @return Returns the serverTimeZone used by this parser.
 */
public TimeZone getServerTimeZone() {
  return this.defaultDateFormat.getTimeZone();
}
/**

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * Get the timezone used for formatting conversions
 *
 * @return the timezone
 */
public TimeZone getTimeZone() {
  return simpleDateFormat.getTimeZone();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-net

/**
 * @return Returns the serverTimeZone used by this parser.
 */
public TimeZone getServerTimeZone() {
  return this.defaultDateFormat.getTimeZone();
}
/**

代码示例来源:origin: tony19/logback-android

@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);
}

相关文章

SimpleDateFormat类方法