1

I'm using Solr-6.2.1 on windows.

When setting set SOLR_TIMEZONE=PST, in solr.in.cmd file, dataimport.properties file saves last_index_time in PDT i.e. UTC-07:00.

When setting set SOLR_TIMEZONE=EST, in solr.in.cmd file, dataimport.properties file saves last_index_time in EST i.e. UTC-05:00.

But

When setting set SOLR_TIMEZONE=PDT or set SOLR_TIMEZONE=EDT, in solr.in.cmd file, dataimport.properties file saves last_index_time of the Server's TimeZone.

I didn't understand why Solr is saving Daylight for PST and not for EST. and why for PDT and EDT it shows time with regarding to the server.

Thakur Sahab
  • 45
  • 11
  • 1
    Are you sure PDT and EDT are valid identifiers? Solr uses Java's TZ library, so my guess is that EDT and PDT aren't considered valid identifiers by themselves? According to [What are the Java Timezone IDs](https://garygregory.wordpress.com/2013/06/18/what-are-the-java-timezone-ids/) there is no PDT or EDT on that list. Try using one of the actual identifiers for the area you're trying to implement. – MatsLindh Oct 31 '18 at 07:59
  • but it takes PST and EST, behaviour for both is different. When setting timezone as PST, this what I'm getting in dataimport.properties **`#Wed Oct 31 02:52:45 PDT 2018`**. But when setting it as EST result is **`#Wed Oct 31 04:57:27 EST 2018`**. Solr is saving 1 hour as daylight savings for PST while for EST no daylight savings. That is the main problem. – Thakur Sahab Oct 31 '18 at 10:00
  • Not all locations using EST are using EDT. Use the specific location and see if you're getting more sensible results. – MatsLindh Oct 31 '18 at 10:13

1 Answers1

1

Don't use EST and PST. They are there for backwards compatibility reasons. Instead prefer the ones marked "Canonical" in the list here. For example:

  • Instead of EST, for most locations using Eastern Time in the US, use America/New_York, or if in Canada use America/Toronto

  • Instead of PST, for most locations using Pacific Time in the US, use America/Los_Angeles, or if in Canada use America/Vancouver

Using these will allow your software to properly choose standard time or daylight time, depending on the date and time in question.

Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575