Skip to main content.
home | support | download

Back to List Archive

Re: [swish-e] Incorrect time zone conversion in the output of search

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Thu Dec 06 2007 - 21:18:50 GMT
On Thu, Dec 06, 2007 at 08:19:31AM -0800, Terry Hung wrote:
>     And later in the process, the function printPropertyResultControl (in 
> result_output.c) uses strftime to derive a local time that is off by 8
> hours relative to the correct value. I dumped the value of pv->value.v_date 
> at this point and it is already off by 8 hours before it reached the 'return'
> command in the code above.

You mean if you print out the timestamp it's off by 8 hours?

moseley@bumby:~$ stat foo.txt | grep Modify
Modify: 2007-12-05 17:51:32.825463137 -0800

moseley@bumby:~$ swish-e -w not dkdk -x '<swishlastmodified fmt="%s">\n' -H0
1196905892

moseley@bumby:~$ perl -le 'print scalar localtime 1196905892'
Wed Dec  5 17:51:32 2007   <<<< matches the file's times.

If it's off 8 hours from what you think then you might want to confirm
that the file's date is really what you think it is.

All swish does is store the value from a stat call to your OS.  The
only timezone adjustment is done when printing it in a search result.

-- 
Bill Moseley
moseley@hank.org

Unsubscribe from or help with the swish-e list: 
   http://swish-e.org/Discussion/

Help with Swish-e:
   http://swish-e.org/current/docs

_______________________________________________
Users mailing list
Users@lists.swish-e.org
http://lists.swish-e.org/listinfo/users
Received on Thu Dec 6 16:18:50 2007