Skip to content

Commit

Permalink
Fix FormattedDate timezone bug (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
InfiniteTF authored Jul 21, 2020
1 parent c1be600 commit f4ae9b0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
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 @@ -28,6 +28,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

0 comments on commit f4ae9b0

Please sign in to comment.