} else {
// it's a mail directory...
// use the last modification time? as the default...
- var dts = new DateTime.from_timeval_utc(mod_time);
- this.created_dir = dts.format("/%Y/%m/%d");
- this.created_date = dts.format("%Y-%m-%d %H:%M:%S");
+ mailtime = new DateTime.from_timeval_utc(mod_time);
+ this.created_dir = mailtime.format("/%Y/%m/%d");
+ this.created_date = mailtime.format("%Y-%m-%d %H:%M:%S");
+ mailtime
}
// check on age of file...
var dbits = lines[i].strip().split(";");
var timez = GMime.utils_header_decode_date(dbits[1], null);
if (timez != 0) {
- var dts = new DateTime.from_unix_utc(timez);
+ mailtime = new DateTime.from_unix_utc(timez);
this.created_date = dts.format("%Y-%m-%d %H:%M:%S");
// if it's not mailfort we can use that date to determine where to store it...
if (!StripApplication.opt_scan_mailfort) {
- this.created_dir = dts.format("/%Y/%m/%d");
+ this.created_dir = mailtime.format("/%Y/%m/%d");
}
}
}
}
}
+
+ var oldest = new DateTime.now_local();
+ oldest.add_months(-1 * StripApplication.opt_min_age);
+ var tspan = mailtime.difference(oldest) / GLib.TimeSpan.MONTH;
+ GLib.log("File is %d months older than %d", tspan, StripApplication.opt_min_age);
+
+
+
+
/*
GLib.debug("Message DATA:\n mid: %s\nmailfort: %s \nexim_id: %s",
this.active_message_id,