[Xapian-tickets] [Xapian] #314: query.cc: $date returns time in GMT only

Xapian nobody at xapian.org
Thu Jul 23 12:41:38 BST 2009


#314: query.cc: $date returns time in GMT only
--------------------+-------------------------------------------------------
 Reporter:  sage    |        Owner:  olly  
     Type:  defect  |       Status:  closed
 Priority:  high    |    Milestone:  1.1.3 
Component:  Omega   |      Version:  1.0.9 
 Severity:  normal  |   Resolution:  fixed 
 Keywords:          |    Blockedby:        
 Platform:  All     |     Blocking:        
--------------------+-------------------------------------------------------
Changes (by olly):

  * status:  assigned => closed
  * resolution:  => fixed
  * milestone:  1.1.4 => 1.1.3


Comment:

 Committed a reworked version of the patch in r13147.

 Documented that {{{$date}}} works in UTC in r13148.

 We could add a way to convert a time_t using a specified timezone, but
 it's not clear to me how this should work.

 Just adding a new {{{$localtime}}} function (or equivalently a boolean
 "localtime" flag to {{{$date}}} doesn't seem flexible enough, as it just
 gives a choice of "localtime" or "gmtime", and often the right answer
 isn't either of those.

 If we add a timezone parameter, what format should it be?  Text name (in
 which case what formats are understood)?  Hours offset (which could be a
 fraction as there are 30 and even 15 minute offsets)?  Minutes offset?

 So while the JavaScript fix may not be to everyone's taste, I'm going to
 close this ticket as I believe it does address the issue.  If someone
 wants to come up with a sensible patch to offer an alternative approach,
 feel free to do so.

-- 
Ticket URL: <http://trac.xapian.org/ticket/314#comment:7>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list