[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Fixed 24 hour time format bugs
From: |
Jorgen Cederlof |
Subject: |
[PATCH] Fixed 24 hour time format bugs |
Date: |
Mon, 9 Feb 2009 22:45:57 -0800 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello,
24 hour time is formatted incorrectly the first ten hours each day. If
I print a page in the morning the header will say "9:23" instead of
"09:23". This patch fixes the problem.
Regards,
Jörgen
--- a2ps-4.14/lib/metaseq.c.orig 2007-12-28 17:58:20.000000000 -0800
+++ a2ps-4.14/lib/metaseq.c 2009-02-09 22:34:37.000000000 -0800
@@ -315,7 +315,7 @@
XFREE (cp);
break;
case 'C': /* `%C' runtime in `hh:mm:ss' format */
- sprintf ((char *)buf, "%d:%02d:%02d", job->run_tm.tm_hour,
+ sprintf ((char *)buf, "%02d:%02d:%02d", job->run_tm.tm_hour,
job->run_tm.tm_min, job->run_tm.tm_sec);
APPEND_STR (buf);
break;
@@ -461,13 +461,13 @@
break;
case 'T': /* `%T' runtime in 24-hour format */
- sprintf ((char *)buf, "%d:%02d",
+ sprintf ((char *)buf, "%02d:%02d",
job->run_tm.tm_hour, job->run_tm.tm_min);
APPEND_STR (buf);
break;
case '*': /* `%*' runtime in 24-hour format with secs */
- sprintf ((char *)buf, "%d:%02d:%02d",
+ sprintf ((char *)buf, "%02d:%02d:%02d",
job->run_tm.tm_hour,
job->run_tm.tm_min,
job->run_tm.tm_sec);
@@ -514,7 +514,7 @@
break;
case '*': /* `$*' modif time in 24-hour format with secs */
- sprintf ((char *)buf, "%d:%02d:%02d",
+ sprintf ((char *)buf, "%02d:%02d:%02d",
file->mod_tm.tm_hour,
file->mod_tm.tm_min,
file->mod_tm.tm_sec);
@@ -622,7 +622,7 @@
break;
case 'C': /* `$C' modtime in `hh:mm:ss' format */
- sprintf ((char *)buf, "%d:%02d:%02d",
+ sprintf ((char *)buf, "%02d:%02d:%02d",
file->mod_tm.tm_hour,
file->mod_tm.tm_min,
file->mod_tm.tm_sec);
@@ -904,7 +904,7 @@
break;
case 'T': /* `$T' runtime in 24-hour format */
- sprintf ((char *)buf, "%d:%02d",
+ sprintf ((char *)buf, "%02d:%02d",
file->mod_tm.tm_hour,
file->mod_tm.tm_min);
APPEND_STR (buf);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Fixed 24 hour time format bugs,
Jorgen Cederlof <=