solrtimezonesolr6

Solr's TimeZone behaviour differs for EST and PST


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.


Solution

  • 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:

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