summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-11-16 11:51:26 -0600
committerDan McGee <dan@archlinux.org>2007-11-16 11:51:26 -0600
commit3cd684b41dd606d42da76fcc3911be446dd3b78b (patch)
treef44f44424df6009153376b314e77facbd0f3f173 /lib/libalpm/util.c
parent6f2b43624915e3e1928cad2bbe14fd8b1ab21e12 (diff)
downloadpacman-3cd684b41dd606d42da76fcc3911be446dd3b78b.tar.xz
libalpm: simplify sync db lastupdate
Legacy code is hitting the trash here. Remove unnecessary _alpm_time2string time storage abstraction in favor of just writing the time_t value to the disk. The only drawback is that everyone's sync DBs will have to be updated at least once so that the lastupdate values are stored right. :) Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 2424e87d..95c12571 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -509,20 +509,6 @@ int _alpm_ldconfig(const char *root)
return(0);
}
-/* convert a time_t to a string - buffer MUST be large enough for
- * YYYYMMDDHHMMSS - 15 chars */
-void _alpm_time2string(time_t t, char *buffer)
-{
- if(buffer) {
- struct tm *lt;
- lt = localtime(&t);
- sprintf(buffer, "%4d%02d%02d%02d%02d%02d",
- lt->tm_year+1900, lt->tm_mon+1, lt->tm_mday,
- lt->tm_hour, lt->tm_min, lt->tm_sec);
- buffer[14] = '\0';
- }
-}
-
/* Helper function for comparing strings using the
* alpm "compare func" signature */
int _alpm_str_cmp(const void *s1, const void *s2)