Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/blacklist/bin fix ymdhms calculation
details: https://anonhg.NetBSD.org/src/rev/f95efb32aa6a
branches: trunk
changeset: 433523:f95efb32aa6a
user: christos <christos%NetBSD.org@localhost>
date: Tue Sep 18 22:12:19 2018 +0000
description:
fix ymdhms calculation
diffstat:
external/bsd/blacklist/bin/support.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (38 lines):
diff -r d7410d5a8bbc -r f95efb32aa6a external/bsd/blacklist/bin/support.c
--- a/external/bsd/blacklist/bin/support.c Tue Sep 18 21:28:22 2018 +0000
+++ b/external/bsd/blacklist/bin/support.c Tue Sep 18 22:12:19 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: support.c,v 1.8 2016/04/04 15:52:56 christos Exp $ */
+/* $NetBSD: support.c,v 1.9 2018/09/18 22:12:19 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: support.c,v 1.8 2016/04/04 15:52:56 christos Exp $");
+__RCSID("$NetBSD: support.c,v 1.9 2018/09/18 22:12:19 christos Exp $");
#include <time.h>
#include <string.h>
@@ -105,12 +105,16 @@
s = t % 60;
t /= 60;
+
m = t % 60;
t /= 60;
- h = t % 60;
+
+ h = t % 24;
t /= 24;
- d = t % 24;
- t /= 356;
+
+ d = t % 365;
+ t /= 365;
+
y = t;
z = 0;
Home |
Main Index |
Thread Index |
Old Index