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

Profile - GMT time is not displayed #2097 #2756

Closed
wants to merge 2 commits into from
Closed
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
10 changes: 9 additions & 1 deletion src/pages/DetailsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,15 @@ const DetailsPage = ({personalDetails, route}) => {
<Text style={[styles.textP]} numberOfLines={1}>
{moment().tz(details.timezone.selected).format('LT')}
{' '}
{moment().tz(details.timezone.selected).zoneAbbr()}
{isNaN(moment().tz(details.timezone.selected).zoneAbbr()) ? (
Copy link
Contributor

@stitesExpensify stitesExpensify May 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind moving the logic here up above the return? So basically make a currentTime var and then here it will just be <Text>{currentTime}</Text>

<Text>{moment().tz(details.timezone.selected).zoneAbbr()}</Text>
) : (
<Text>
{moment.tz(details.timezone.selected).toString().split("-")[0].slice(-3)}
{' '}
{moment().tz(details.timezone.selected).zoneAbbr()}
</Text>
)}
</Text>
</View>
) : null}
Expand Down