X-Git-Url: https://git.gag.com/?p=debian%2Fcpmtools;a=blobdiff_plain;f=cpmls.c;h=983817a0bf033de357b04d4bf7ca199974f9e943;hp=382ad3add73e87dc75fda9a3677888b4a21cc26e;hb=da79766c5b4c4bae50ddc7bd81b610d3a45c5899;hpb=224b4e6d27a3af235500d9d8028ddbd3a60af7ed diff --git a/cpmls.c b/cpmls.c index 382ad3a..983817a 100644 --- a/cpmls.c +++ b/cpmls.c @@ -7,7 +7,7 @@ #include #include -#include "getopt.h" +#include "getopt_.h" #include "cpmfs.h" #ifdef USE_DMALLOC @@ -114,9 +114,9 @@ static void oldddir(char **dirent, int entries, struct cpmInode *ino) putchar(' '); if (statbuf.mtime) { - tmp=gmtime(&statbuf.mtime); + tmp=localtime(&statbuf.mtime); printf(" %02d-%s-%04d %02d:%02d",tmp->tm_mday,month[tmp->tm_mon],tmp->tm_year+1900,tmp->tm_hour,tmp->tm_min); - tmp=gmtime(&statbuf.ctime); + tmp=localtime(&statbuf.ctime); printf(" %02d-%s-%04d %02d:%02d",tmp->tm_mday,month[tmp->tm_mon],tmp->tm_year+1900,tmp->tm_hour,tmp->tm_min); } putchar('\n'); @@ -189,9 +189,9 @@ static void old3dir(char **dirent, int entries, struct cpmInode *ino) else if (attrib & CPM_ATTR_PWWRITE) printf("Write "); else if (attrib & CPM_ATTR_PWDEL) printf("Delete "); else printf("None "); - tmp=gmtime(&statbuf.mtime); + tmp=localtime(&statbuf.mtime); printf("%02d/%02d/%02d %02d:%02d ",tmp->tm_mon+1,tmp->tm_mday,tmp->tm_year%100,tmp->tm_hour,tmp->tm_min); - tmp=gmtime(&statbuf.ctime); + tmp=localtime(&statbuf.ctime); printf("%02d/%02d/%02d %02d:%02d",tmp->tm_mon+1,tmp->tm_mday,tmp->tm_year%100,tmp->tm_hour,tmp->tm_min); putchar('\n'); ++l; @@ -260,7 +260,7 @@ static void ls(char **dirent, int entries, struct cpmInode *ino, int l, int c, i printf(" %-2d ",dir[i].user); #endif printf("%8.1ld ",(long)statbuf.size); - tmp=gmtime(c ? &statbuf.ctime : &statbuf.mtime); + tmp=localtime(c ? &statbuf.ctime : &statbuf.mtime); printf("%s %02d ",month[tmp->tm_mon],tmp->tm_mday); if ((c ? statbuf.ctime : statbuf.mtime)<(now-182*24*3600)) printf("%04d ",tmp->tm_year+1900); else printf("%02d:%02d ",tmp->tm_hour,tmp->tm_min);