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

Xapian nobody at xapian.org
Sat Nov 29 03:15:08 GMT 2008


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

  * status:  new => assigned
  * milestone:  => 1.1.0


Comment:

 {{{localtime()}}} isn't really the correct answer either - the timezone
 the server is in is usually an "implementation detail".  On an intranet it
 will probably work OK (unless your intranet spans multiple timezones), but
 not for a website on the internet.

 But there certainly is an issue here - UTC is an arbitrary choice.

 Ideally we'd determine the timezone of the end-user automatically and use
 that, but it's not trivial to find - it requires some javascript magic,
 and a mechanism to get the information back to the server.

 Perhaps in the short term, {{{localtime()}}} is better than {{{gmtime()}}}
 since at least it works better for most intranet cases.

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



More information about the Xapian-tickets mailing list