660b308617
The broken down time-representation tm generated earlier is in UTC, and mktime() assumes that it's in local time instead, leading to the problem that quark might not send a NOT_MODIFIED in a different timezone. timegm() instead correctly interprets the broken down time-representation tm as UTC and returns the proper timestamp. It might not be portable like mktime(), but it's complicated to emulate it otherwise. Thanks to Jeremy Bobbin <jer@jer.cx> for reporting the bug and providing this fix, which is why I've added him to the LICENSE. Thanks also to Hiltjo for his input. Signed-off-by: Laslo Hunhold <dev@frign.de>
27 lines
1.3 KiB
Text
27 lines
1.3 KiB
Text
ISC-License
|
|
|
|
Copyright 2016-2020 Laslo Hunhold <dev@frign.de>
|
|
|
|
Copyright 2004 Ted Unangst <tedu@openbsd.org>
|
|
Copyright 2004 Todd C. Miller <Todd.Miller@courtesan.com>
|
|
Copyright 2008 Otto Moerbeek <otto@drijf.net>
|
|
Copyright 2017-2018 Hiltjo Posthuma <hiltjo@codemadness.org>
|
|
Copyright 2017-2018 Quentin Rameau <quinq@fifth.space>
|
|
Copyright 2018 Josuah Demangeon <mail@josuah.net>
|
|
Copyright 2018 Dominik Schmidt <domischmidt@swissonline.ch>
|
|
Copyright 2018 Aaron Burrow <burrows@charstarstar.com>
|
|
Copyright 2020 Nihal Jere <nihal@nihaljere.xyz>
|
|
Copyright 2020 Rainer Holzner <rholzner@web.de>
|
|
Copyright 2020 Jeremy Bobbin <jer@jer.cx>
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|