The datetime driven deltas use the MySQL NOW() function when selecting
records to add to the delta index. Since the NOW() function uses the
system TZ, this becomes a problem if the DB is not in UTC and
config.active_record.default_timezone == :utc

Ideally, one should just put the DB in UTC, but that's not always an
option (e.g. in shared environments or existing production systems).
Some possible solutions that could be supported via TS are:

1. Make a ThinkingSphinx.default_timezone which is :local or :utc
(like AR does it) and thus toggles between NOW() and UTC_TIMESTAMP().
This is trivial to implement, but hardly generic - that may not matter
though as these are the same options that exist for AR.

2. Make an "offset" attribute in the set_property :delta declaration
to manually adjust for the TZ discrepancy

3. Provide the means to manually specify the SQL used to get "current
time"

4. Ability to add a "pre query" which sets the time zone for the
connection, i.e. SET time_zone = '+00:00'; (this could be the product
of offset suggestion in item 2),

Any suggestions on other approaches? Any preferences or other thoughts
in this area?

Morten

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to