Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FormattedDate timezone bug #681

Merged
merged 2 commits into from
Jul 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ui/v2.5/src/components/Changelog/Version.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Version: React.FC<IVersionProps> = ({
<Icon icon={open ? "angle-up" : "angle-down"} className="mr-3" />
{version} (
{date ? (
<FormattedDate value={new Date(Date.parse(date))} />
<FormattedDate value={date} timeZone="utc" />
) : (
<FormattedMessage
defaultMessage="Development Version"
Expand Down
3 changes: 3 additions & 0 deletions ui/v2.5/src/components/Changelog/versions/v030.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ const markup = `
* Show rating as stars in scene page.
* Add reload scrapers button.

### 🐛 Bug fixes
* Fix formatted dates using incorrect timezone.

`;

export default () => <ReactMarkdown source={markup} />;
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ export const SceneDetailPanel: React.FC<ISceneDetailProps> = (props) => {
</div>
{props.scene.date ? (
<h5>
<FormattedDate value={props.scene.date} format="long" />
<FormattedDate
value={props.scene.date}
format="long"
timeZone="utc"
/>
</h5>
) : undefined}
{props.scene.rating ? (
Expand Down