fix: accountInfo: missing creation date on non-json output

This commit is contained in:
Stéphane Lesimple 2022-02-03 11:44:21 +00:00 committed by Stéphane Lesimple
parent e5cfa26853
commit 6baa61a7f4

View file

@ -170,10 +170,10 @@ if (OVH::Bastion::is_auditor(account => $self)) {
}
else {
$ret{'creation_information'} = $creation_info;
if ($creation_info->{'time_utc'}) {
my $createdOnStr = $creation_info->{'time_utc'};
if ($creation_info->{'time_local'} && $creation_info->{'time_utc'} ne $creation_info->{'time_local'}) {
$createdOnStr .= " / " . $creation_info->{'time_local'};
if ($creation_info->{'datetime_utc'}) {
my $createdOnStr = $creation_info->{'datetime_utc'};
if ($creation_info->{'datetime_local'} && $creation_info->{'datetime_utc'} ne $creation_info->{'datetime_local'}) {
$createdOnStr .= " / " . $creation_info->{'datetime_local'};
}
$createdOnStr = sprintf(
"Created on %s (%s ago)",