From d6ff9e53cf724460b6f827edf40d698d35ffa2f7 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Wed, 27 Jan 2021 14:18:20 -0500 Subject: Change default timestamp format to %X This respects the user's locale settings. --- chat.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'chat.c') diff --git a/chat.c b/chat.c index 7de427c..7335520 100644 --- a/chat.c +++ b/chat.c @@ -125,16 +125,6 @@ static void parseHash(char *str) { if (*str) hashBound = strtoul(&str[1], NULL, 0); } -static void parseTimestamp(const char *format) { - uiTime.enable = true; - if (!format) return; - char buf[TimeCap]; - uiTime.format = format; - struct tm *time = localtime(&(time_t) { -22100400 }); - uiTime.width = strftime(buf, sizeof(buf), format, time); - if (!uiTime.width) errx(EX_USAGE, "invalid timestamp format: %s", format); -} - #ifdef __OpenBSD__ static void unveilConfig(const char *name) { @@ -246,7 +236,10 @@ int main(int argc, char *argv[]) { break; case 'O': utilPush(&urlOpenUtil, optarg); break; case 'R': self.restricted = true; break; case 'S': bind = optarg; - break; case 'T': parseTimestamp(optarg); + break; case 'T': { + uiTime.enable = true; + if (optarg) uiTime.format = optarg; + } break; case 'a': sasl = true; self.plain = optarg; break; case 'c': cert = optarg; break; case 'e': sasl = true; -- cgit 1.4.0 d1ee&follow=1'>diff
path: root/.irbrc (unfollow)
Commit message (Collapse)Author
2013-05-04Update awesome themeJune McEnroe
2013-04-27Update terminal colors with proper base16 paletteJune McEnroe
2013-04-27Update location of Xfce4-Terminal configurationJune McEnroe
2013-04-24Update system configurationsJune McEnroe
2013-04-23Fix terminal colorsJune McEnroe
2013-04-14Start xcompmgrJune McEnroe
2013-04-06Drop pacman-color, regular pacman now has colorJune McEnroe
2013-04-06Restore wallpaper automaticallyJune McEnroe
2013-03-22Simplify autostartJune McEnroe
2013-02-24Default to Ruby 2.0June McEnroe
2013-01-26Make pretty riplrcJune McEnroe
2013-01-26Default to awesome sessionJune McEnroe
2013-01-26Add git promptJune McEnroe
2013-01-26Actually port awesome config to 3.5June McEnroe
2013-01-26Make pretty zshrcJune McEnroe
2013-01-26Port awesome config to 3.5June McEnroe
2013-01-26Replace RVM with chrubyJune McEnroe