forked from lix-project/lix
Change lastModified to the number of seconds in the epoch
'lastModifiedDate' is now a string representing the equivalent date/time.
This commit is contained in:
parent
6d6467d376
commit
ab47868639
|
@ -13,7 +13,7 @@
|
||||||
versionSuffix =
|
versionSuffix =
|
||||||
if officialRelease
|
if officialRelease
|
||||||
then ""
|
then ""
|
||||||
else "pre${builtins.substring 0 8 self.lastModified}_${self.shortRev or "dirty"}";
|
else "pre${builtins.substring 0 8 self.lastModifiedDate}_${self.shortRev or "dirty"}";
|
||||||
|
|
||||||
officialRelease = false;
|
officialRelease = false;
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,11 @@ void emitTreeAttrs(
|
||||||
if (tree.info.revCount)
|
if (tree.info.revCount)
|
||||||
mkInt(*state.allocAttr(v, state.symbols.create("revCount")), *tree.info.revCount);
|
mkInt(*state.allocAttr(v, state.symbols.create("revCount")), *tree.info.revCount);
|
||||||
|
|
||||||
if (tree.info.lastModified)
|
if (tree.info.lastModified) {
|
||||||
mkString(*state.allocAttr(v, state.symbols.create("lastModified")),
|
mkInt(*state.allocAttr(v, state.symbols.create("lastModified")), *tree.info.lastModified);
|
||||||
|
mkString(*state.allocAttr(v, state.symbols.create("lastModifiedDate")),
|
||||||
fmt("%s", std::put_time(std::gmtime(&*tree.info.lastModified), "%Y%m%d%H%M%S")));
|
fmt("%s", std::put_time(std::gmtime(&*tree.info.lastModified), "%Y%m%d%H%M%S")));
|
||||||
|
}
|
||||||
|
|
||||||
v.attrs->sort();
|
v.attrs->sort();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue