Commit edaaf87e authored by Thomas Schmitt's avatar Thomas Schmitt

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

parent e3276b57
...@@ -271,6 +271,27 @@ static const char *un0(const char *text) ...@@ -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 Xorriso_pvd_info(struct XorrisO *xorriso, int flag)
{ {
int ret, msc1= -1, msc2, i; int ret, msc1= -1, msc2, i;
...@@ -330,15 +351,10 @@ int Xorriso_pvd_info(struct XorrisO *xorriso, int flag) ...@@ -330,15 +351,10 @@ int Xorriso_pvd_info(struct XorrisO *xorriso, int flag)
ret= iso_image_get_pvd_times(image, &crt, &mdt, &ext, &eft); ret= iso_image_get_pvd_times(image, &crt, &mdt, &ext, &eft);
if(ret != ISO_SUCCESS) if(ret != ISO_SUCCESS)
crt= mdt= ext= eft= ""; crt= mdt= ext= eft= "";
sprintf(msg, "Creation Time: %s\n", crt); Xorriso_report_pvd_time(xorriso, "Creation Time:", crt, 0);
Xorriso_result(xorriso,0); Xorriso_report_pvd_time(xorriso, "Modif. Time :", mdt, 0);
sprintf(msg, "Modif. Time : %s\n", mdt); Xorriso_report_pvd_time(xorriso, "Expir. Time :", ext, 0);
Xorriso_result(xorriso,0); Xorriso_report_pvd_time(xorriso, "Eff. Time :", eft, 0);
sprintf(msg, "Expir. Time : %s\n", ext);
Xorriso_result(xorriso,0);
sprintf(msg, "Eff. Time : %s\n", eft);
Xorriso_result(xorriso,0);
return(1); return(1);
} }
......
#define Xorriso_timestamP "2014.02.08.111505" #define Xorriso_timestamP "2014.02.09.141412"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment