index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2007-11-08 23:18:07 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-11-08 23:18:07 -0600 |
commit | e6673544b2afc9e463cdbf4e7d0bb0b5d7b6b80d (patch) | |
tree | bf3982d47f33e872a229a8b31e2528dfeea802a8 /lib | |
parent | 5b4b4df4c9c2cfb3aa2e4b40c2c49ea8bf10ce37 (diff) |
-rw-r--r-- | lib/libalpm/be_files.c | 4 | ||||
-rw-r--r-- | lib/libalpm/package.c | 2 |
diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c index 793a5c63..4b85306b 100644 --- a/lib/libalpm/be_files.c +++ b/lib/libalpm/be_files.c @@ -337,8 +337,10 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq) char first = tolower(tmp[0]); if(first > 'a' && first < 'z') { struct tm tmp_tm = {0}; //initialize to null incase of failure + setlocale(LC_TIME, "C"); strptime(tmp, "%a %b %e %H:%M:%S %Y", &tmp_tm); info->builddate = mktime(&tmp_tm); + setlocale(LC_TIME, ""); } else { info->builddate = atol(tmp); } @@ -352,8 +354,10 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq) char first = tolower(tmp[0]); if(first > 'a' && first < 'z') { struct tm tmp_tm = {0}; //initialize to null incase of failure + setlocale(LC_TIME, "C"); strptime(tmp, "%a %b %e %H:%M:%S %Y", &tmp_tm); info->installdate = mktime(&tmp_tm); + setlocale(LC_TIME, ""); } else { info->installdate = atol(tmp); } diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 5103a382..1e59938f 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -852,8 +852,10 @@ static int parse_descfile(const char *descfile, pmpkg_t *info) char first = tolower(ptr[0]); if(first > 'a' && first < 'z') { struct tm tmp_tm = {0}; //initialize to null incase of failure + setlocale(LC_TIME, "C"); strptime(ptr, "%a %b %e %H:%M:%S %Y", &tmp_tm); info->builddate = mktime(&tmp_tm); + setlocale(LC_TIME, ""); } else { info->builddate = atol(ptr); } |