Re: [hackers] [quark][PATCH] fix for NOT_MODIFIED being sent in non-GMT timezone

2020-07-23 Thread Laslo Hunhold
On Tue, 21 Jul 2020 20:38:41 +0200 Hiltjo Posthuma wrote: Dear Hiltjo, > I would use timegm(). It is not in POSIX, but it does exactly the > right thing. It should be available in glibc, musl and on all BSDs. > > Hacking around mktime to get the correct result has some gotcha's. I > would not d

Re: [hackers] [quark][PATCH] fix for NOT_MODIFIED being sent in non-GMT timezone

2020-07-21 Thread Hiltjo Posthuma
On Tue, Jul 21, 2020 at 07:51:56PM +0200, Laslo Hunhold wrote: > On Sun, 19 Jul 2020 09:37:31 -0700 > Jeremy wrote: > > Dear Jeremy, > > I wrote this this mail yesterday, but the mailing list had some > technical problems, so I'm resending it. > > > stat(3)'s mtime is in local time while REQ_MO

Re: [hackers] [quark][PATCH] fix for NOT_MODIFIED being sent in non-GMT timezone

2020-07-21 Thread Laslo Hunhold
On Sun, 19 Jul 2020 09:37:31 -0700 Jeremy wrote: Dear Jeremy, I wrote this this mail yesterday, but the mailing list had some technical problems, so I'm resending it. > stat(3)'s mtime is in local time while REQ_MOD is in GMT. > This patch translates mtime to GMT before comparing to REQ_MOD. I

Re: [hackers] [quark][PATCH] fix for NOT_MODIFIED being sent in non-GMT timezone

2020-07-21 Thread Jeremy
Hey Hiltjo, I appreciate your feedback. That suggestion works well and is nicer. I've submitted the modified patch. Thanks! Jeremy On 07/19/20 10:33PM, Hiltjo Posthuma wrote: > On Sun, Jul 19, 2020 at 09:37:31AM -0700, Jeremy wrote: > > From: Jeremy Bobbin > > > > stat(3)'s mtime is in local t

Re: [hackers] [quark][PATCH] fix for NOT_MODIFIED being sent in non-GMT timezone

2020-07-19 Thread Hiltjo Posthuma
On Sun, Jul 19, 2020 at 09:37:31AM -0700, Jeremy wrote: > From: Jeremy Bobbin > > stat(3)'s mtime is in local time while REQ_MOD is in GMT. > This patch translates mtime to GMT before comparing to REQ_MOD. > --- > http.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a

[hackers] [quark][PATCH] fix for NOT_MODIFIED being sent in non-GMT timezone

2020-07-19 Thread Jeremy
From: Jeremy Bobbin stat(3)'s mtime is in local time while REQ_MOD is in GMT. This patch translates mtime to GMT before comparing to REQ_MOD. --- http.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/http.c b/http.c index 249c168..0c707be 100644 --- a/http.c +++ b/http.c @