[
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-636?pag...
]
Sanne Grinovero commented on HSEARCH-636:
-----------------------------------------
well the docs already have a warning about storing in GMT.
What I was referring to is that even if you store all dates in GMT (on both index and
database, that's usually recommended anyway), when people enter a query they
intuitively mean their own timestamp, and don't even think about possible daylight
changes in both past and future. So your user interface will convert the "date
string" entered by the user considering a timezone, for example what the user
preferences have set, but then there's still a shift as the "now()" meant by
the user might be a different date in GMT than the date the user would intuitively
expect.
Choose a point in time, if you write down the hour (no minutes needed) of it and then
convert date+hour to GMT, you get the possibility to define query ranges in the 1h-step,
so enabling you to make a date query on the index considering as rage limits not the GMT
day beginning and end but the _user localized_ idea of "day start" and "day
end".
DateBridge substracts one day from date
---------------------------------------
Key: HSEARCH-636
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-636
Project: Hibernate Search
Issue Type: Bug
Affects Versions: 3.3.0.CR1
Environment: Lucene 3.0.2
Reporter: Marc Schipperheyn
I find that the public String objectToString(Object object) in the DateBridge class
consistently returns a date that's one day before the date being passed.
A Date object with date 2011-12-12 will become a string representation of 2011-12-11.
Since the Lucene core DateTools are used, I assume the problem lies there and you might
want to consider moving to another date library.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira