summary refs log tree commit diff
path: root/scoop.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--scoop.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/scoop.c b/scoop.c
index 006a416..7fb9e28 100644
--- a/scoop.c
+++ b/scoop.c
@@ -227,7 +227,18 @@ static const char *Inner = SQL(
 	SELECT
 		contexts.network,
 		contexts.name AS context,
-		strftime(coalesce(:format, '%Y-%m-%dT%H:%M:%SZ'), events.time) AS time,
+		CASE WHEN :local THEN
+			strftime(
+				coalesce(:format, '%Y-%m-%dT%H:%M:%S'),
+				events.time,
+				'localtime'
+			)
+		ELSE
+			strftime(
+				coalesce(:format, '%Y-%m-%dT%H:%M:%SZ'),
+				events.time
+			)
+		END AS time,
 		events.type,
 		names.nick,
 		names.user,
@@ -365,11 +376,12 @@ int main(int argc, char *argv[]) {
 	const char *where = NULL;
 
 	int opt;
-	const char *Opts = "D:F:N:T:a:b:c:d:f:gh:l:m:n:pqst:u:vw:";
+	const char *Opts = "D:F:LN:T:a:b:c:d:f:gh:l:m:n:pqst:u:vw:";
 	while (0 < (opt = getopt(argc, argv, Opts))) {
 		switch (opt) {
 			break; case 'D': binds[n++] = Bind(":date", optarg, 0);
 			break; case 'F': binds[n++] = Bind(":format", optarg, 0);
+			break; case 'L': binds[n++] = Bind(":local", NULL, 1);
 			break; case 'N': binds[n++] = Bind(":network", optarg, 0);
 			break; case 'T': binds[n++] = Bind(":target", optarg, 0);
 			break; case 'a': binds[n++] = Bind(":after", optarg, 0);
'logheader'>2019-09-05Print title as soon as it's availableJune McEnroe 2019-09-05Use CURL_PREFIX to set flagsJune McEnroe 2019-09-05Add titleJune McEnroe 2019-09-04Add Avorter n'est pas tuerJune McEnroe 2019-08-29Unset executable on shell scriptsJune McEnroe 2019-08-29Add long-missing setopt to bin.7June McEnroe 2019-08-29Add editJune McEnroe