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

Improve time formatting #56

Closed
mrwee opened this issue Jan 30, 2019 · 7 comments
Closed

Improve time formatting #56

mrwee opened this issue Jan 30, 2019 · 7 comments

Comments

@mrwee
Copy link

mrwee commented Jan 30, 2019

In v0.1.3 date & time is shown as MM/DD/YYYY HH:MM:SS AM/PM.
I'd like to use my local date/time format which is DD-MM-YYYY HH:MM.SS (24H format), so MQTT-Explorer should follow my Windows settings.

@thomasnordquist
Copy link
Owner

I actually thought that it would.
I'll take a look.

That's how the date s currently formatted, it should use the default time / date formate of your country, if the correct country is selected in you operating system.

class DateFormatter extends React.Component<Props, {}> {
public render() {
return <span>{this.props.date.toLocaleDateString()} {this.props.date.toLocaleTimeString()}</span>
}
}

@thomasnordquist
Copy link
Owner

@mrwee Thanks btw. for your input =)

@mrwee
Copy link
Author

mrwee commented Jan 30, 2019

You're welcome. It's a fantastic piece of software!
I'm not that much into programming, but if you look at the attached file, then the upmost part is how Windows display's date+time is shown, mid is how MQTT-Explorer displays's and the bottom part is the Regional format settings.
2019-01-30_13-53-59

@mrwee mrwee closed this as completed Jan 30, 2019
@mrwee mrwee reopened this Jan 30, 2019
@mrwee
Copy link
Author

mrwee commented Jan 30, 2019

Ups. Accidentally closed it.

@thomasnordquist thomasnordquist changed the title Add support for local date/time format Improve time formatting Feb 18, 2019
@thomasnordquist
Copy link
Owner

I added proper time formatting, based on system language.
62cbf65

@mrwee
Copy link
Author

mrwee commented Mar 26, 2019

Looking forward :). Keep up the good work!

@thomasnordquist
Copy link
Owner

This has already been released with v0.2.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants