Closed (fixed)
Project:
Apache Solr Search
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
8 Feb 2010 at 21:37 UTC
Updated:
18 Apr 2010 at 23:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
meba commentedApplied without a problem, then tried browsing the site - works
Comment #2
janusman commentedMeba: would you say it's Ready to be committed? =)
Comment #3
meba commentedNot sure, I am not familiar with apachesolr enough (yet :-)
Comment #4
robertdouglass commentedLooks good to me. Thanks.
Comment #5
janusman commentedOk, see commits for 6.x-1.x, 6.x-2.x and 5.x-2.x:
http://drupal.org/cvs?commit=339236
http://drupal.org/cvs?commit=339240
http://drupal.org/cvs?commit=339244
Comment #6
pwolanin commentedNo, this was not right. I think the timezone should be NULL not zero so that the user sees the time in their own TZ (or the site TZ).
http://api.drupal.org/api/function/format_date/6
Comment #7
meba commentedComment #8
pwolanin commentedI think the 1st patch is already committed, so please roll any new patches from the latest CVS.
Comment #9
janusman commented@pwolanin: IIUC, the original code always showed dates in the GMT timezone, ignoring the site's/user's timezone settings. So I think your comment is more about the original code than my patch? =)
Either way, I agree the dates should be shown in the site's/user's timezone settings.
Comment #10
janusman commentedWould this do? This patch is for the current 6.x-2.x-DEV.
Comment #11
pwolanin commentedI think that's all that's required, assuming you tested it
Comment #12
janusman commentedI looked a bit into this and it won't work =(
*In a sense* date handling is a bit broken since before the patch:
Produces these results::
Both show up in the month "february" in the "FIlter by post date" block, and one of them under march:

Clicking on "february" now shows both (!) in Feb. 28 and one in march 1st:

Clicking on "february 28th" shows one at 11PM, the other at 12AM...
Note: Making the second node's time from 00:00:00 to 00:00:01 +0000 fixes this (shows a count of (1) under february, and (1) under march)
Now, still with the rolled-back patch (currently using gmdate()) I change the site's timezone to -0600 and leave the nodes. The same filters show as above.
Now, when I introduce the first patch, the behavior is the same as the earlier cases, BUT the dates are now localized (which was my intention in the first place).
If I use the patch from #10 (use format_date with a timezone of NULL instead of 0) things get *screwy*... this shows up after searching by keyword for the nodes:
clicking on "January" (yes, january!??) now shows:
etc. etc.
Soooo...to close out:
conclusion
I move to use the original patch which doesn't try to fix anything regarding the timezones, just localizes the dates =) The timezone issue is (I bet) a more complex issue since we'd have to issue Solr queries in GTM shifted by the timezone the user is viewing (e.g. so a node posted as 28-feb-2010 +0000 will show up to a user in CST timezone (-0600) as "March > March 1 > March 1, 06:00" ... AND if he wants to filter to "March" it would mean sending to Solr a time-shifted query (instead of the current simplistic [2010-03-01 00:00:00Z TO 2010-04-01 00:00:00Z])
Thoughts?
Comment #13
janusman commentedBTW my proposal to "use the original patch" in effect means "do nothing and mark this issue fixed" as that patch was already committed.
Comment #14
pwolanin commented@janusman - I was wondering about the very timezone issue you bring up. It would be especially bad if you are a lon g ways from GMT - but as is it will be bad since your result set may include dats that are listed as half a day off from your apparent query.
So, I think we cannot mark this as closed, but perhaps you are right that we should not change 0 to NULL for now.
Comment #15
janusman commentedI'm just suggesting to close the original issue (localize existing functionality). IMO the timezone problem should be a whole different issue.
Can I somehow convince you to close this out and open a different issue for the [more complex] timezone issue? =) If not, just adjust the issue's title =)
Comment #16
pwolanin commentedSure, let's open a new issue.