diff --git a/cmd/neofs-cli/modules/object/lock.go b/cmd/neofs-cli/modules/object/lock.go index 9f952d4d1..e8df8793f 100644 --- a/cmd/neofs-cli/modules/object/lock.go +++ b/cmd/neofs-cli/modules/object/lock.go @@ -63,9 +63,11 @@ var objectLockCmd = &cobra.Command{ currEpoch, err := internalclient.GetCurrentEpoch(ctx, endpoint) common.ExitOnErr(cmd, "Request current epoch: %w", err) - exp += currEpoch + exp = currEpoch + lifetime } + common.PrintVerbose("Lock object will expire at %d epoch", exp) + var expirationAttr objectSDK.Attribute expirationAttr.SetKey(objectV2.SysAttributeExpEpoch) expirationAttr.SetValue(strconv.FormatUint(exp, 10))