mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-22 14:12:26 +00:00
functions: fix date calculations
In case date(1) does not support nanosecond resolution, it does not interpret '%N', and leave it as-is. So we have to remove it. Note that some versions replaces '%N' with 'N', so we have to take this into account as well. Reported-by: Kyle Grieb <grieb.kyle@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
This commit is contained in:
parent
98ceb8faf3
commit
bdf0b26e19
@ -250,7 +250,7 @@ CT_Which() {
|
|||||||
# to the highest entire second
|
# to the highest entire second
|
||||||
# Usage: CT_DoDate <fmt>
|
# Usage: CT_DoDate <fmt>
|
||||||
CT_DoDate() {
|
CT_DoDate() {
|
||||||
date "$1" |sed -r -e 's/N$/000000000/;'
|
date "$1" |sed -r -e 's/%?N$/000000000/;'
|
||||||
}
|
}
|
||||||
|
|
||||||
CT_STEP_COUNT=1
|
CT_STEP_COUNT=1
|
||||||
|
Loading…
Reference in New Issue
Block a user