Browse Source

Improved output of -pvd_info with timestamps with non-zero time zone

tags/1.3.6
Thomas Schmitt 6 years ago
parent
commit
edaaf87e7d
2 changed files with 26 additions and 10 deletions
  1. +25
    -9
      xorriso/iso_img.c
  2. +1
    -1
      xorriso/xorriso_timestamp.h

+ 25
- 9
xorriso/iso_img.c View File

@@ -271,6 +271,27 @@ static const char *un0(const char *text)
}


static int Xorriso_report_pvd_time(struct XorrisO *xorriso, char *head,
char *pvd_time, int flag)
{
char *msg, hr[17];
int at;

msg= xorriso->result_line;
strncpy(hr, pvd_time, 16);
hr[16]= 0;
sprintf(msg, "%s %s\n", head, hr);
Xorriso_result(xorriso,0);
if(pvd_time[16] != 0) {
at= abs(pvd_time[16]);
sprintf(msg, "%2.2s. Time Zone: %c%-2.2d:%-2.2d\n", head,
pvd_time[16] > 0 ? '+' : '-', at / 4, (at - (at / 4) * 4) * 15);
Xorriso_result(xorriso,0);
}
return(1);
}


int Xorriso_pvd_info(struct XorrisO *xorriso, int flag)
{
int ret, msc1= -1, msc2, i;
@@ -330,15 +351,10 @@ int Xorriso_pvd_info(struct XorrisO *xorriso, int flag)
ret= iso_image_get_pvd_times(image, &crt, &mdt, &ext, &eft);
if(ret != ISO_SUCCESS)
crt= mdt= ext= eft= "";
sprintf(msg, "Creation Time: %s\n", crt);
Xorriso_result(xorriso,0);
sprintf(msg, "Modif. Time : %s\n", mdt);
Xorriso_result(xorriso,0);
sprintf(msg, "Expir. Time : %s\n", ext);
Xorriso_result(xorriso,0);
sprintf(msg, "Eff. Time : %s\n", eft);
Xorriso_result(xorriso,0);

Xorriso_report_pvd_time(xorriso, "Creation Time:", crt, 0);
Xorriso_report_pvd_time(xorriso, "Modif. Time :", mdt, 0);
Xorriso_report_pvd_time(xorriso, "Expir. Time :", ext, 0);
Xorriso_report_pvd_time(xorriso, "Eff. Time :", eft, 0);
return(1);
}



+ 1
- 1
xorriso/xorriso_timestamp.h View File

@@ -1 +1 @@
#define Xorriso_timestamP "2014.02.08.111505"
#define Xorriso_timestamP "2014.02.09.141412"

Loading…
Cancel
Save