summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 47a885ec..a5885064 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -809,10 +809,7 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
_alpm_pkg_update_requiredby(newpkg);
/* make an install date (in UTC) */
- time_t t = time(NULL);
- strncpy(newpkg->installdate, asctime(gmtime(&t)), PKG_DATE_LEN);
- /* remove the extra line feed appended by asctime() */
- newpkg->installdate[strlen(newpkg->installdate)-1] = 0;
+ newpkg->installdate = time(NULL);
_alpm_log(PM_LOG_DEBUG, "updating database\n");
_alpm_log(PM_LOG_DEBUG, "adding database entry '%s'\n", newpkg->name);