Corrected the interpretation of user supplied ECMA-119 timestamp strings
This commit is contained in:
parent
bb79d95bcc
commit
108806ddca
@ -99,6 +99,13 @@ AC_PROG_INSTALL
|
|||||||
|
|
||||||
AC_CHECK_HEADERS()
|
AC_CHECK_HEADERS()
|
||||||
|
|
||||||
|
dnl Check for tm_gmtoff field in struct tm
|
||||||
|
AC_CHECK_MEMBER([struct tm.tm_gmtoff],
|
||||||
|
[AC_DEFINE(HAVE_TM_GMTOFF, 1,
|
||||||
|
[Define this if tm structure includes a tm_gmtoff entry.])],
|
||||||
|
,
|
||||||
|
[#include <time.h>])
|
||||||
|
|
||||||
THREAD_LIBS=-lpthread
|
THREAD_LIBS=-lpthread
|
||||||
AC_SUBST(THREAD_LIBS)
|
AC_SUBST(THREAD_LIBS)
|
||||||
|
|
||||||
|
@ -457,14 +457,20 @@ ex:
|
|||||||
|
|
||||||
|
|
||||||
int Decode_ecma119_format(struct tm *erg, char *text, int flag)
|
int Decode_ecma119_format(struct tm *erg, char *text, int flag)
|
||||||
/* YYYYMMDDhhmmsscc */
|
/* YYYYMMDDhhmmsscc[LOC] */
|
||||||
/* 2010040711405800 */
|
/* 2010040711405800 */
|
||||||
{
|
{
|
||||||
int i, l, num;
|
int i, l, num, utc= 1;
|
||||||
|
|
||||||
memset(erg, 0, sizeof(*erg));
|
memset(erg, 0, sizeof(*erg));
|
||||||
erg->tm_isdst= -1;
|
erg->tm_isdst= -1;
|
||||||
l= strlen(text);
|
l= strlen(text);
|
||||||
|
if(l == 19) {
|
||||||
|
if(strcmp(text + 16, "LOC") != 0)
|
||||||
|
return(0);
|
||||||
|
utc= 0;
|
||||||
|
l= 16;
|
||||||
|
}
|
||||||
if(l != 16)
|
if(l != 16)
|
||||||
return(0);
|
return(0);
|
||||||
for(i= 0; i < l; i++)
|
for(i= 0; i < l; i++)
|
||||||
@ -491,7 +497,7 @@ int Decode_ecma119_format(struct tm *erg, char *text, int flag)
|
|||||||
erg->tm_sec= 10*(text[12]-'0')+text[13]-'0';
|
erg->tm_sec= 10*(text[12]-'0')+text[13]-'0';
|
||||||
if(erg->tm_sec > 59)
|
if(erg->tm_sec > 59)
|
||||||
return(0);
|
return(0);
|
||||||
return(1);
|
return(1 + !utc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -575,7 +581,7 @@ time_t Decode_timestring(char *code, time_t *date, int flag)
|
|||||||
char scale_chr;
|
char scale_chr;
|
||||||
double value,seconds;
|
double value,seconds;
|
||||||
struct tm result_tm;
|
struct tm result_tm;
|
||||||
int seconds_valid= 0;
|
int seconds_valid= 0, ret;
|
||||||
|
|
||||||
*date= 0;
|
*date= 0;
|
||||||
if(code[0]=='-' || code[0]=='+' || code[0]=='=' || code[0]=='@'){
|
if(code[0]=='-' || code[0]=='+' || code[0]=='=' || code[0]=='@'){
|
||||||
@ -627,10 +633,21 @@ time_t Decode_timestring(char *code, time_t *date, int flag)
|
|||||||
seconds= mktime(&result_tm);
|
seconds= mktime(&result_tm);
|
||||||
seconds_valid= 1;
|
seconds_valid= 1;
|
||||||
goto completed;
|
goto completed;
|
||||||
} else if(Decode_ecma119_format(&result_tm, code, 0)>0) {
|
} else if((ret= Decode_ecma119_format(&result_tm, code, 0)) > 0) {
|
||||||
/* YYYYMMDDhhmmsscc */
|
/* YYYYMMDDhhmmsscc[UTC] */
|
||||||
/* 2010040711405800 */
|
/* 2010040711405800UTC */
|
||||||
seconds= mktime(&result_tm);
|
seconds= mktime(&result_tm);
|
||||||
|
if(ret == 1) {
|
||||||
|
|
||||||
|
#ifdef HAVE_TM_GMTOFF
|
||||||
|
seconds+= result_tm.tm_gmtoff;
|
||||||
|
#else
|
||||||
|
if(result_tm.tm_isdst < 0)
|
||||||
|
result_tm.tm_isdst = 0;
|
||||||
|
seconds-= timezone - result_tm.tm_isdst * 3600;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
seconds_valid= 1;
|
seconds_valid= 1;
|
||||||
goto completed;
|
goto completed;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
.\" First parameter, NAME, should be all caps
|
.\" First parameter, NAME, should be all caps
|
||||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||||
.\" other parameters are allowed: see man(7), man(1)
|
.\" other parameters are allowed: see man(7), man(1)
|
||||||
.TH XORRISO 1 "Version 1.2.7, Mar 05, 2013"
|
.TH XORRISO 1 "Version 1.2.7, Mar 11, 2013"
|
||||||
.\" Please adjust this date whenever revising the manpage.
|
.\" Please adjust this date whenever revising the manpage.
|
||||||
.\"
|
.\"
|
||||||
.\" Some roff macros, for reference:
|
.\" Some roff macros, for reference:
|
||||||
@ -1599,6 +1599,15 @@ scdbackup timestamps:
|
|||||||
YYMMDD[.hhmm[ss]]
|
YYMMDD[.hhmm[ss]]
|
||||||
.br
|
.br
|
||||||
where "A0" is year 2000, "B0" is 2010, etc.
|
where "A0" is year 2000, "B0" is 2010, etc.
|
||||||
|
.br
|
||||||
|
ECMA\-119 volume timestamps:
|
||||||
|
.br
|
||||||
|
YYYYMMDDhhmmsscc
|
||||||
|
.br
|
||||||
|
These are normally given as GMT. The suffix "LOC" causes local timezone
|
||||||
|
conversion. E.g. 2013010720574700, 2013010720574700LOC.
|
||||||
|
The last two digits cc (centiseconds) will be ignored, but must be present
|
||||||
|
in order to make the format recognizable.
|
||||||
.TP
|
.TP
|
||||||
\fB\-alter_date_r\fR type timestring iso_rr_path [***]
|
\fB\-alter_date_r\fR type timestring iso_rr_path [***]
|
||||||
Like \-alter_date but affecting all files below eventual directories.
|
Like \-alter_date but affecting all files below eventual directories.
|
||||||
@ -2548,7 +2557,7 @@ It is supposed to match this GRUB line:
|
|||||||
E.g. 2010040711405800 is 7 Apr 2010 11:40:58 (+0 centiseconds).
|
E.g. 2010040711405800 is 7 Apr 2010 11:40:58 (+0 centiseconds).
|
||||||
.br
|
.br
|
||||||
Timestrings for the other types may be given as with command \-alter_date.
|
Timestrings for the other types may be given as with command \-alter_date.
|
||||||
They are prone to timezone computations. The timestrings "default" or
|
Some of them are prone to timezone computations. The timestrings "default" or
|
||||||
"overridden" cause default settings: "c" and "m" will show the current time
|
"overridden" cause default settings: "c" and "m" will show the current time
|
||||||
of image creation. "x" and "f" will be marked as insignificant.
|
of image creation. "x" and "f" will be marked as insignificant.
|
||||||
"uuid" will be deactivated.
|
"uuid" will be deactivated.
|
||||||
@ -3506,9 +3515,9 @@ The free space after the next \-commit might be smaller by several MB.
|
|||||||
This depends on medium type, number of recorded sessions, and drive habits.
|
This depends on medium type, number of recorded sessions, and drive habits.
|
||||||
.TP
|
.TP
|
||||||
\fB\-pvd_info\fR
|
\fB\-pvd_info\fR
|
||||||
Print various ID strings which can be found in loaded ISO images. Some of
|
Print various ID strings which can be found in loaded ISO
|
||||||
them may be changed by commands like \-volid or \-publisher. For these
|
images. Some of the IDs may be changed by commands like \-volid or \-publisher.
|
||||||
IDs \-pvd_info reports what would be written with the next \-commit.
|
For these IDs \-pvd_info reports what would be written with the next \-commit.
|
||||||
.TP
|
.TP
|
||||||
.B Navigation in ISO image and disk filesystem:
|
.B Navigation in ISO image and disk filesystem:
|
||||||
.TP
|
.TP
|
||||||
|
@ -1449,6 +1449,12 @@ whether they stem from the loaded image or were newly inserted.
|
|||||||
scdbackup timestamps:
|
scdbackup timestamps:
|
||||||
YYMMDD[.hhmm[ss]]
|
YYMMDD[.hhmm[ss]]
|
||||||
where "A0" is year 2000, "B0" is 2010, etc.
|
where "A0" is year 2000, "B0" is 2010, etc.
|
||||||
|
ECMA-119 volume timestamps:
|
||||||
|
YYYYMMDDhhmmsscc
|
||||||
|
These are normally given as GMT. The suffix "LOC" causes local
|
||||||
|
timezone conversion. E.g. 2013010720574700, 2013010720574700LOC.
|
||||||
|
The last two digits cc (centiseconds) will be ignored, but must be
|
||||||
|
present in order to make the format recognizable.
|
||||||
|
|
||||||
-alter_date_r type timestring iso_rr_path [***]
|
-alter_date_r type timestring iso_rr_path [***]
|
||||||
Like -alter_date but affecting all files below eventual
|
Like -alter_date but affecting all files below eventual
|
||||||
@ -2257,7 +2263,7 @@ according to the setting of command -acl.
|
|||||||
search --fs-uuid --set YYYY-MM-DD-hh-mm-ss-cc
|
search --fs-uuid --set YYYY-MM-DD-hh-mm-ss-cc
|
||||||
E.g. 2010040711405800 is 7 Apr 2010 11:40:58 (+0 centiseconds).
|
E.g. 2010040711405800 is 7 Apr 2010 11:40:58 (+0 centiseconds).
|
||||||
Timestrings for the other types may be given as with command
|
Timestrings for the other types may be given as with command
|
||||||
-alter_date. They are prone to timezone computations. The
|
-alter_date. Some of them are prone to timezone computations. The
|
||||||
timestrings "default" or "overridden" cause default settings: "c"
|
timestrings "default" or "overridden" cause default settings: "c"
|
||||||
and "m" will show the current time of image creation. "x" and "f"
|
and "m" will show the current time of image creation. "x" and "f"
|
||||||
will be marked as insignificant. "uuid" will be deactivated.
|
will be marked as insignificant. "uuid" will be deactivated.
|
||||||
@ -3073,9 +3079,9 @@ File: xorriso.info, Node: Inquiry, Next: Navigate, Prev: DialogCtl, Up: Comm
|
|||||||
|
|
||||||
-pvd_info
|
-pvd_info
|
||||||
Print various ID strings which can be found in loaded ISO images.
|
Print various ID strings which can be found in loaded ISO images.
|
||||||
Some of them may be changed by commands like -volid or -publisher.
|
Some of the IDs may be changed by commands like -volid or
|
||||||
For these IDs -pvd_info reports what would be written with the
|
-publisher. For these IDs -pvd_info reports what would be written
|
||||||
next -commit.
|
with the next -commit.
|
||||||
|
|
||||||
|
|
||||||
File: xorriso.info, Node: Navigate, Next: Verify, Prev: Inquiry, Up: Commands
|
File: xorriso.info, Node: Navigate, Next: Verify, Prev: Inquiry, Up: Commands
|
||||||
@ -4686,7 +4692,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
|||||||
* -add inserts one or more paths: Insert. (line 45)
|
* -add inserts one or more paths: Insert. (line 45)
|
||||||
* -add_plainly inserts one or more paths: Insert. (line 64)
|
* -add_plainly inserts one or more paths: Insert. (line 64)
|
||||||
* -alter_date sets timestamps in ISO image: Manip. (line 147)
|
* -alter_date sets timestamps in ISO image: Manip. (line 147)
|
||||||
* -alter_date_r sets timestamps in ISO image: Manip. (line 167)
|
* -alter_date_r sets timestamps in ISO image: Manip. (line 173)
|
||||||
* -append_partition adds arbitrary file after image end: Bootable.
|
* -append_partition adds arbitrary file after image end: Bootable.
|
||||||
(line 234)
|
(line 234)
|
||||||
* -application_id sets application id: SetWrite. (line 192)
|
* -application_id sets application id: SetWrite. (line 192)
|
||||||
@ -4773,7 +4779,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
|||||||
* -hardlinks controls handling of hard links: Loading. (line 110)
|
* -hardlinks controls handling of hard links: Loading. (line 110)
|
||||||
* -help prints help text: Scripting. (line 20)
|
* -help prints help text: Scripting. (line 20)
|
||||||
* -hfsplus enables production of HFS+ partition: SetWrite. (line 14)
|
* -hfsplus enables production of HFS+ partition: SetWrite. (line 14)
|
||||||
* -hide excludes file names from directory trees: Manip. (line 171)
|
* -hide excludes file names from directory trees: Manip. (line 177)
|
||||||
* -history brings text into readline history: Scripting. (line 44)
|
* -history brings text into readline history: Scripting. (line 44)
|
||||||
* -in_charset sets input character set: Loading. (line 92)
|
* -in_charset sets input character set: Loading. (line 92)
|
||||||
* -indev acquires a drive for input: AqDrive. (line 24)
|
* -indev acquires a drive for input: AqDrive. (line 24)
|
||||||
@ -5002,7 +5008,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
|
|||||||
* Hard links, control handling, -hardlinks: Loading. (line 110)
|
* Hard links, control handling, -hardlinks: Loading. (line 110)
|
||||||
* HFS+ allocation block size: Bootable. (line 222)
|
* HFS+ allocation block size: Bootable. (line 222)
|
||||||
* HFS+ serial number: Bootable. (line 219)
|
* HFS+ serial number: Bootable. (line 219)
|
||||||
* hidden, set in ISO image, -hide: Manip. (line 171)
|
* hidden, set in ISO image, -hide: Manip. (line 177)
|
||||||
* Image reading, cache size, -data_cache_size: Loading. (line 269)
|
* Image reading, cache size, -data_cache_size: Loading. (line 269)
|
||||||
* Image, _definition: Model. (line 9)
|
* Image, _definition: Model. (line 9)
|
||||||
* Image, demand volume ID, -assert_volid: Loading. (line 84)
|
* Image, demand volume ID, -assert_volid: Loading. (line 84)
|
||||||
@ -5149,7 +5155,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
|
|||||||
* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 211)
|
* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 211)
|
||||||
* Table-of-content, show, -toc: Inquiry. (line 28)
|
* Table-of-content, show, -toc: Inquiry. (line 28)
|
||||||
* Timestamps, set in ISO image, -alter_date: Manip. (line 147)
|
* Timestamps, set in ISO image, -alter_date: Manip. (line 147)
|
||||||
* Timestamps, set in ISO image, -alter_date_r: Manip. (line 167)
|
* Timestamps, set in ISO image, -alter_date_r: Manip. (line 173)
|
||||||
* Tree, disk, traverse, -findx: Navigate. (line 106)
|
* Tree, disk, traverse, -findx: Navigate. (line 106)
|
||||||
* Tree, ISO, traverse and alter, -find: CmdFind. (line 7)
|
* Tree, ISO, traverse and alter, -find: CmdFind. (line 7)
|
||||||
* Verify, check blocks, -check_media: Verify. (line 21)
|
* Verify, check blocks, -check_media: Verify. (line 21)
|
||||||
@ -5205,44 +5211,44 @@ Node: Loading30695
|
|||||||
Node: Insert46151
|
Node: Insert46151
|
||||||
Node: SetInsert56287
|
Node: SetInsert56287
|
||||||
Node: Manip64864
|
Node: Manip64864
|
||||||
Node: CmdFind73688
|
Node: CmdFind74008
|
||||||
Node: Filter88393
|
Node: Filter88713
|
||||||
Node: Writing92949
|
Node: Writing93269
|
||||||
Node: SetWrite102337
|
Node: SetWrite102657
|
||||||
Node: Bootable121080
|
Node: Bootable121408
|
||||||
Node: Jigdo136474
|
Node: Jigdo136802
|
||||||
Node: Charset140721
|
Node: Charset141049
|
||||||
Node: Exception143483
|
Node: Exception143811
|
||||||
Node: DialogCtl149603
|
Node: DialogCtl149931
|
||||||
Node: Inquiry152201
|
Node: Inquiry152529
|
||||||
Node: Navigate158037
|
Node: Navigate158369
|
||||||
Node: Verify166335
|
Node: Verify166667
|
||||||
Node: Restore175367
|
Node: Restore175699
|
||||||
Node: Emulation182454
|
Node: Emulation182786
|
||||||
Node: Scripting192578
|
Node: Scripting192910
|
||||||
Node: Frontend199739
|
Node: Frontend200071
|
||||||
Node: Examples207814
|
Node: Examples208146
|
||||||
Node: ExDevices208992
|
Node: ExDevices209324
|
||||||
Node: ExCreate209651
|
Node: ExCreate209983
|
||||||
Node: ExDialog210936
|
Node: ExDialog211268
|
||||||
Node: ExGrowing212201
|
Node: ExGrowing212533
|
||||||
Node: ExModifying213006
|
Node: ExModifying213338
|
||||||
Node: ExBootable213510
|
Node: ExBootable213842
|
||||||
Node: ExCharset214062
|
Node: ExCharset214394
|
||||||
Node: ExPseudo214883
|
Node: ExPseudo215215
|
||||||
Node: ExCdrecord215781
|
Node: ExCdrecord216113
|
||||||
Node: ExMkisofs216098
|
Node: ExMkisofs216430
|
||||||
Node: ExGrowisofs217438
|
Node: ExGrowisofs217770
|
||||||
Node: ExException218573
|
Node: ExException218905
|
||||||
Node: ExTime219027
|
Node: ExTime219359
|
||||||
Node: ExIncBackup219486
|
Node: ExIncBackup219818
|
||||||
Node: ExRestore223478
|
Node: ExRestore223810
|
||||||
Node: ExRecovery224438
|
Node: ExRecovery224770
|
||||||
Node: Files225008
|
Node: Files225340
|
||||||
Node: Seealso226307
|
Node: Seealso226639
|
||||||
Node: Bugreport227030
|
Node: Bugreport227362
|
||||||
Node: Legal227611
|
Node: Legal227943
|
||||||
Node: CommandIdx228622
|
Node: CommandIdx228954
|
||||||
Node: ConceptIdx244851
|
Node: ConceptIdx245183
|
||||||
|
|
||||||
End Tag Table
|
End Tag Table
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
@c man .\" First parameter, NAME, should be all caps
|
@c man .\" First parameter, NAME, should be all caps
|
||||||
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||||
@c man .\" other parameters are allowed: see man(7), man(1)
|
@c man .\" other parameters are allowed: see man(7), man(1)
|
||||||
@c man .TH XORRISO 1 "Version 1.2.7, Mar 05, 2013"
|
@c man .TH XORRISO 1 "Version 1.2.7, Mar 11, 2013"
|
||||||
@c man .\" Please adjust this date whenever revising the manpage.
|
@c man .\" Please adjust this date whenever revising the manpage.
|
||||||
@c man .\"
|
@c man .\"
|
||||||
@c man .\" Some roff macros, for reference:
|
@c man .\" Some roff macros, for reference:
|
||||||
@ -1962,6 +1962,15 @@ scdbackup timestamps:
|
|||||||
YYMMDD[.hhmm[ss]]
|
YYMMDD[.hhmm[ss]]
|
||||||
@*
|
@*
|
||||||
where "A0" is year 2000, "B0" is 2010, etc.
|
where "A0" is year 2000, "B0" is 2010, etc.
|
||||||
|
@*
|
||||||
|
ECMA-119 volume timestamps:
|
||||||
|
@*
|
||||||
|
YYYYMMDDhhmmsscc
|
||||||
|
@*
|
||||||
|
These are normally given as GMT. The suffix "LOC" causes local timezone
|
||||||
|
conversion. E.g. 2013010720574700, 2013010720574700LOC.
|
||||||
|
The last two digits cc (centiseconds) will be ignored, but must be present
|
||||||
|
in order to make the format recognizable.
|
||||||
@c man .TP
|
@c man .TP
|
||||||
@item -alter_date_r type timestring iso_rr_path [***]
|
@item -alter_date_r type timestring iso_rr_path [***]
|
||||||
@kindex -alter_date_r sets timestamps in ISO image
|
@kindex -alter_date_r sets timestamps in ISO image
|
||||||
@ -3015,7 +3024,7 @@ It is supposed to match this GRUB line:
|
|||||||
E.g. 2010040711405800 is 7 Apr 2010 11:40:58 (+0 centiseconds).
|
E.g. 2010040711405800 is 7 Apr 2010 11:40:58 (+0 centiseconds).
|
||||||
@*
|
@*
|
||||||
Timestrings for the other types may be given as with command -alter_date.
|
Timestrings for the other types may be given as with command -alter_date.
|
||||||
They are prone to timezone computations. The timestrings "default" or
|
Some of them are prone to timezone computations. The timestrings "default" or
|
||||||
"overridden" cause default settings: "c" and "m" will show the current time
|
"overridden" cause default settings: "c" and "m" will show the current time
|
||||||
of image creation. "x" and "f" will be marked as insignificant.
|
of image creation. "x" and "f" will be marked as insignificant.
|
||||||
"uuid" will be deactivated.
|
"uuid" will be deactivated.
|
||||||
@ -4106,9 +4115,9 @@ This depends on medium type, number of recorded sessions, and drive habits.
|
|||||||
@item -pvd_info
|
@item -pvd_info
|
||||||
@kindex -pvd_info shows image id strings
|
@kindex -pvd_info shows image id strings
|
||||||
@cindex Image, show id strings, -pvd_info
|
@cindex Image, show id strings, -pvd_info
|
||||||
Print various ID strings which can be found in loaded ISO images. Some of
|
Print various ID strings which can be found in loaded ISO
|
||||||
them may be changed by commands like -volid or -publisher. For these
|
images. Some of the IDs may be changed by commands like -volid or -publisher.
|
||||||
IDs -pvd_info reports what would be written with the next -commit.
|
For these IDs -pvd_info reports what would be written with the next -commit.
|
||||||
@end table
|
@end table
|
||||||
@c man .TP
|
@c man .TP
|
||||||
@c man .B Navigation in ISO image and disk filesystem:
|
@c man .B Navigation in ISO image and disk filesystem:
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2013.03.12.194637"
|
#define Xorriso_timestamP "2013.03.12.194842"
|
||||||
|
Loading…
Reference in New Issue
Block a user