Commits

Sebastian Freundt committed 5039429

minor, support --default=DT in dconv tool, using dt_set_default() and the new massaging routine

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>

Comments (0)

Files changed (2)

 QUIET
 FORMAT
 INPUT_FORMAT
+
+option "default" -
+	"For underspecified input use DT as a fallback to fill in \
+missing fields.  Must be a date/time in ISO8601 format.  If omitted \
+the default value is the current date/time."
+	string typestr="DT" optional
+
 BACKSLASH_ESCAPES
 SED_MODE
 
 FROM_ZONE
 TO_ZONE
-
 	if (argi->zone_given) {
 		z = zif_open(argi->zone_arg);
 	}
+	if (argi->default_given) {
+		struct dt_dt_s dflt = dt_strpdt(argi->default_arg, NULL, NULL);
+		dt_set_default(dflt);
+	}
 
 	if (argi->inputs_num) {
 		for (size_t i = 0; i < argi->inputs_num; i++) {