Example usage for org.apache.solr.request SolrRequestInfo getClientTimeZone

List of usage examples for org.apache.solr.request SolrRequestInfo getClientTimeZone

Introduction

In this page you can find the example usage for org.apache.solr.request SolrRequestInfo getClientTimeZone.

Prototype

public TimeZone getClientTimeZone() 

Source Link

Document

The TimeZone specified by the request, or UTC if none was specified.

Usage

From source file:test.DateMathParser.java

License:Apache License

public static TimeZone getTZ(TimeZone tz) {
    if (null == tz) {
        SolrRequestInfo reqInfo = SolrRequestInfo.getRequestInfo();
        tz = (null != reqInfo) ? reqInfo.getClientTimeZone() : DEFAULT_MATH_TZ;
    }/*  w  w  w . j a v  a 2 s. c om*/
    return (null != tz) ? tz : DEFAULT_MATH_TZ;
}