mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
23 lines
543 B
TypeScript
23 lines
543 B
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
|
|
import React from "react";
|
|
import { observer } from "mobx-react";
|
|
import moment from "moment-timezone";
|
|
import { UserStore } from "../../../common/user-store";
|
|
|
|
interface Props {
|
|
date: string;
|
|
}
|
|
|
|
@observer
|
|
export class LocaleDate extends React.Component<Props> {
|
|
render() {
|
|
const { date } = this.props;
|
|
|
|
return moment.tz(date, UserStore.getInstance().localeTimezone).format();
|
|
}
|
|
}
|