Edit

IABSD.fr/src/bin/date

Branch :

  • Show log

    Commit

  • Author : schwarze
    Date : 2021-08-11 13:41:48
    Hash : c96a7dff
    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@.