CVSROOT: /cvs Module name: src Changes by: schwa...@cvs.openbsd.org 2021/08/11 07:41:48
Modified files: bin/date : date.c Log message: If the -f argument includes %s, we need to use timegm(3) rather than mktime(3) because the UNIX Epoch is defined in UTC rather than in the local timezone. Combining %s with other format specifiers is usually not useful. But if a user does that, then parsing the whole input as UTC seems better than parsing some of it as UTC and some of it in the local time zone. Bug found by Bryan Vyhmeister. The final patch is joint work with and OK by gerhard@. No objection when shown on tech@.