aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-10-22 18:55:32 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-10-22 18:55:32 +0000
commitcd3461ed2decce6e980d3a4c93c615bd8f4cb5c0 (patch)
treed62af90d1db9db8f0dd241d06a9e221234572467 /mdoc_html.c
parent97e702f1687ec3975b215d6ea566bf1d6aca30a8 (diff)
downloadmandoc-cd3461ed2decce6e980d3a4c93c615bd8f4cb5c0.tar.gz
mandoc-cd3461ed2decce6e980d3a4c93c615bd8f4cb5c0.tar.zst
mandoc-cd3461ed2decce6e980d3a4c93c615bd8f4cb5c0.zip
Fixed maddening mismatch between groff and strftime mismatch of day ("%e"). Noted by Ulrich Sporlein.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 69623baf..74d06cff 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.35 2009/10/20 05:45:21 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.36 2009/10/22 18:55:32 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -456,10 +456,11 @@ print_mdoc_node(MDOC_ARGS)
static void
mdoc_root_post(MDOC_ARGS)
{
- struct tm tm;
struct htmlpair tag[2];
struct tag *t, *tt;
- char b[BUFSIZ];
+ char b[DATESIZ];
+
+ time2a(m->date, b, DATESIZ);
/*
* XXX: this should use divs, but in Firefox, divs with nested
@@ -467,11 +468,6 @@ mdoc_root_post(MDOC_ARGS)
* below. So I use tables, instead.
*/
- (void)localtime_r(&m->date, &tm);
-
- if (0 == strftime(b, BUFSIZ - 1, "%B %e, %Y", &tm))
- err(EXIT_FAILURE, "strftime");
-
PAIR_CLASS_INIT(&tag[0], "footer");
bufcat_style(h, "width", "100%");
PAIR_STYLE_INIT(&tag[1], h);