From 586639907bbcf568089c04aced6669116888cdbf Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sun, 16 Mar 2025 01:29:32 +0200 Subject: All date functions accumulated in _ak_utils --- lib/_ak_zchain | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/_ak_zchain') diff --git a/lib/_ak_zchain b/lib/_ak_zchain index d015afd..547e773 100755 --- a/lib/_ak_zchain +++ b/lib/_ak_zchain @@ -17,6 +17,7 @@ ### You should have received a copy of the GNU General Public License ### along with this program. If not, see . ### +source $AK_LIBDIR/_ak_utils source $AK_LIBDIR/_ak_log source $AK_LIBDIR/_ak_ipfs source $AK_LIBDIR/_ak_zblock @@ -48,7 +49,7 @@ function _ak_zchain_reset(){ if [ $? -eq 0 ] then _ak_log_info "Archive the previous AK_ZLATEST" - _ak_ipfs_files_cp /zlatest /zarchive/$(date -u +%s)-$(_ak_ipfs_files_stat /zlatest | head -n 1) + _ak_ipfs_files_cp /zlatest /zarchive/$(_ak_datetime_unix)-$(_ak_ipfs_files_stat /zlatest | head -n 1) if [ $? -ne 0 ] then _ak_log_error "Failed to copy /zlatest to /zarchive" @@ -99,7 +100,7 @@ function _ak_zchain_rebase(){ _ak_ipfs_files_mkdir /zarchive if [ $? != 0 ]; then echo "Folder already there"; fi echo "Archive the previous ZLATEST" - _ak_ipfs_files_cp /zlatest /zarchive/$(date -u +%s)-$(_ak_ipfs_files_stat /zlatest | head -n 1) + _ak_ipfs_files_cp /zlatest /zarchive/$(_ak_datetime_unix)-$(_ak_ipfs_files_stat /zlatest | head -n 1) if [ $? != 0 ]; then exit 1; fi echo "Removing previous /zlatest entry" _ak_ipfs_files_rm /zlatest -- cgit v1.2.3