ports/167279: [Patch] dbmail 3.0.2 - Added Option for full date and time in datefield
Klaus Mayr
klaus at mayr-software.net
Tue Apr 24 22:00:26 UTC 2012
>Number: 167279
>Category: ports
>Synopsis: [Patch] dbmail 3.0.2 - Added Option for full date and time in datefield
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Apr 24 22:00:25 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Klaus Mayr
>Release: 8.2-RELEASE
>Organization:
Mayr Software & Netzwerke
>Environment:
8.2-RELEASE GENERIC amd64
>Description:
In DBMail 3.0 the values in dbmail_datefield.datefield are reduced to DATE
instead of DATETIME like in previous version 2.3.x.
In some applications i wrote based on dbmail i use datefield for displaying
(and sorting by) date and time of a message.
I added an option (default is Off) and extra patch to set datefield back to
a full datetime as a workaround.
>How-To-Repeat:
n/a
>Fix:
--- ./src/dbmail-message.c.orig 2012-04-24 22:23:38.000000000 +0200
+++ ./src/dbmail-message.c 2012-04-24 22:25:16.000000000 +0200
@@ -1334,7 +1334,7 @@
date += (self->internal_date_gmtoff * 36);
datefield = g_new0(gchar, 20);
- strftime(datefield, 20, "%Y-%m-%d", gmtime(&date));
+ strftime(datefield, 20, "%Y-%m-%d %H:%M:%S", gmtime(&date));
_header_name_get_id(self, "Date", &headername_id);
_header_value_get_id(value, sortfield, datefield, &headervalue_id);
@@ -1716,7 +1716,7 @@
date += (offset * 36); // +0200 -> offset 200
datefield = g_new0(gchar,20);
- strftime(datefield,20,"%Y-%m-%d", gmtime(&date));
+ strftime(datefield,20,"%Y-%m-%d %H:%M:%S", gmtime(&date));
TRACE(TRACE_DEBUG,"Date is [%s] offset [%d], datefield [%s]",
value, offset, datefield);
******************************************************************************
--- Makefile.org 2012-04-24 22:05:15.000000000 +0200
+++ Makefile 2012-04-24 23:14:58.000000000 +0200
@@ -27,7 +27,8 @@
CONFLICTS= dbmail-*-2.0.* dbmail-2.*
OPTIONS= SIEVE "Build with support for Sieve mail sorting language" off \
- LDAP "Build with support for LDAP authentication" off
+ LDAP "Build with support for LDAP authentication" off \
+ DATEFIELD "Use DATETIME instead of DATE in datefield" off
USE_AUTOTOOLS= libtool
USE_GMAKE= yes
@@ -85,6 +86,10 @@
CONFIGURE_ARGS+= --enable-manpages
.endif
+.if defined(WITH_DATEFIELD)
+EXTRA_PATCHES = ${FILESDIR}/extra-patch-dbmail-message.patch
+.endif
+
post-install:
@${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
@if [ ! -f ${PREFIX}/etc/dbmail.conf ] ; then \
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list