Local bucket creation time (#2464)

<img width="1327" alt="Screen Shot 2022-11-16 at 9 57 57 AM"
src="https://user-images.githubusercontent.com/65002498/202257455-ceb041b0-4db9-44f3-9fd3-cc73c89f4339.png">


Fixes https://github.com/minio/console/issues/2462

Authored-by: Jillian Inapurapu <jillii@Jillians-MBP.attlocal.net>
This commit is contained in:
jinapurapu
2022-11-16 15:40:22 -08:00
committed by GitHub
parent dbec9fbb4a
commit 0b3b5979ba
3 changed files with 10 additions and 4 deletions

View File

@@ -236,9 +236,9 @@ const BucketListItem = ({
</Grid>
<Grid item xs={12}>
<Grid container className={classes.bucketInfo}>
<Grid item xs={12} sm>
<Grid item xs={12} sm paddingRight={5}>
<Typography variant="body2">
Created: {bucket.creation_date}
Created: {new Date(bucket.creation_date).toString()}
</Typography>
</Grid>
<Grid item xs={12} sm>

View File

@@ -1405,7 +1405,9 @@ const ListObjects = () => {
<Grid item xs={12} className={classes.bucketDetails}>
<span className={classes.detailsSpacer}>
Created:&nbsp;&nbsp;&nbsp;
<strong>{bucketInfo?.creation_date || ""}</strong>
<strong>
{new Date(bucketInfo?.creation_date || "").toString()}
</strong>
</span>
<span className={classes.detailsSpacer}>
Access:&nbsp;&nbsp;&nbsp;

View File

@@ -26,7 +26,11 @@ export const displayParsedDate = (object: BucketObjectItem) => {
if (object.name.endsWith("/")) {
return "";
}
return <reactMoment.default>{object.last_modified}</reactMoment.default>;
return (
<reactMoment.default>
{new Date(object.last_modified).toString()}
</reactMoment.default>
);
};
export const displayNiceBytes = (object: BucketObjectItem) => {