title: Solr: Day of week, second of day with timezones
body: <p>We require to search by <strong>day of week</strong> and <strong>time of day</strong> using <strong>SOLR</strong>. </p>
  
  <p>That`s why we first convert date to UTC and then create two index fields: UTC second of day and UTC day of week.
  We know what timezone user requests, so we are able to shift this required values and create query: </p>
  
  <blockquote>
    <p>Monday from 4:00 to 6:00 AM in +5 timezone</p>
  </blockquote>
  
  <p>is converted to search values for UTC: </p>
  
  <blockquote>
    <p>(Sunday from 23:00 to 24:00) OR Monday (0:00 to 1:00)</p>
  </blockquote>
  
  <p>Unfortunatelly this query will fail in timezones with daylight saving time, when timezone is shifted  +5 is +6.</p>
  
  <p>Is there a way how to query by correct time of day?</p>
  
  <p>Only solution we could think of is add to query also date ranges, which were in summer/winter time:
  ((Sunday from 23:00 to 24:00) OR Monday (0:00 to 1:00)) AND (30.10.2015 TO 27.3.2016) OR Monday (0:00 to 2:00)) AND (27.3.2015 TO 30.10.2015 ) OR ... OR ... , 
  where these ... represents date, when was switched from summer to winter time. </p>
  
  <p>Data may be recorded in any timezone and viewed in any timezone as well</p>