datefmt

format unix timestamps over stdin
git clone git://jb55.com/datefmt
Log | Files | Refs | README | LICENSE

commit cd775356b1421c824389f6dbc5b56c64b947bb94
parent ae9b02cbe88934b4bcd079682c84d754666bd190
Author: William Casarin <jb55@jb55.com>
Date:   Sun,  5 Dec 2021 20:10:55 -0800

Fix build on clang

Potentially dubious

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mdatefmt.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/datefmt.c b/datefmt.c @@ -99,7 +99,7 @@ static enum state doaction(int c, enum state new_state, struct parser *parser) ts = strtoll(parser->digits, NULL, 10); /* found date */ if (time_matches(parser, ts)) { - strftime(timebuf, sizeof(timebuf), parser->format, localtime(&ts)); + strftime(timebuf, sizeof(timebuf), parser->format, localtime((time_t*)&ts)); printf("%s%s", timebuf, charbuf); } else { print_rest(parser, charbuf, &new_state);