-
-
Notifications
You must be signed in to change notification settings - Fork 703
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
Remove date format option #879
Comments
Tooltips are definitely better (and easier to use, no need to scroll to the preamble) than adding timezone to the preamble. Let's keep in mind that some people may want to use UTC timestamps (eg. #287). Currently it's possible by using the I'm not sure whether removing date format field completely is the best way. Maybe it would be better to just set the default value (on the first DCE launch) according to user's system locale? That way we don't remove the ability to customize the exports. But overall I support this suggestion. |
What about… exporting messages to plain text… It's need some kind of time formatting… |
That's why I think that instead of removing the date format option we should set the its default value according to the user's system locale (instead of setting it to some static default format). In that way we still allow user to customize the time format while making the default format friendly (so a lot of users don't need to customize it). User may want to customize the format for a couple of reasons:
That's why I suggest to keep the settings, but modify its default value according to user's locale instead of using a static format as a default one. |
The main issue is that there is no one date format to configure, as timestamps are rendered differently in different places. It would make sense to make the locale configurable instead. But I think you can already do that in Docker without application level settings (googling around yields some results, but I haven't tried). |
Running with root@cb2d53787251:/out# locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=
LANGUAGE=
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=en_GB.UTF-8 probably only |
There are many situations (I listed some of them earlier) when you would want to use a different format than the one set in the OS settings. And we can't forget about some people wanting to export in UTC (eg. #287). I'm not sure if that can even be set in locale settings without changing the timezone (and that affects many other aspects of the OS and other applications). I don't see any reason why timestamps should be rendered differently in different places. I would rather display all timestamps in the same format - the one set by the user (which by default should be set according to OS locale). That makes more sense than taking away extra configuration ability and then using OS locale everywhere. If we want to use the same format everywhere why not keep the ability to customize it? |
Discord renders them differently in different places, so to stay consistent we need to as well |
So what's the plan? Read users locale and adjust all formats according to the locale and make them look like on Discord? That would require having some sort of list of how date in each place looks for every possible locale. That's of course doable, but will require a lot of work. Or do we just use short/long date format from OS locale and ignore how it would look on discord? In both cases I suggest keeping the custom date format textbox that would override the format everywhere, eg. to allow exporting in UTC. |
What's the plan for dates in embed footers (#648)? If the Discord API returns them as a date but the Discord client renders them incorrectly, how would you be able to format them the same way as Discord? Does every embed use the same format for their timestamps? Regarding the use cases that @zabszk brought up, I think a setting to tweak timezone/locale would cover most of them. It's pretty reasonable, in my opinion, to want to deviate from your system's default settings, and many apps seem to provide that functionality. I do agree that a fully customizable date format like we have now has gotten a bit messy with the additional complexity that DiscordChatExporter has accrued, though. |
The question is whether we should format timestamps exactly the same way as Discord does (unless user overrides the format in the settings)?
Do we want to have the ability to override every possible format/place separately or do we want just one config that overrides every date format? |
I have some things in regard to this topic:
What if we allowed users not to completely customize the timestamp, but instead use one of Discord's presets (e. g. German, English-US)? We could have a table with all 3 formats for each language. That way, we wouldn't have to use a custom date format from the user for different areas and we would come even closer to Discord's behavior. However, I don't know if there would be any new problems with that.
|
No, it ignores the provided format and uses a hard-codded one (which is just
If we make the format non-configurable, then we can easily have different formats for different places, just like Discord does.
From the perspective of code complexity, Discord's approach is simpler since we can just extract regional format settings from the built-in system cultures. On Windows, it corresponds to this: We can have the drop down just like Discord, or just use the current system culture. Obviously, I prefer the latter. Allowing the user to configure each separate format adds complexity, isn't future-proof (what if another format appears?), and I doubt there will be many people who will actually want to do that.
I think the embed timestamps have the same format regardless of user settings. I believe you pointed it out in the past: #648 |
Ok
Yeah
Isn't Discord's approach also based on your application language? That's why I proposed
Yeah, I totally agree. |
Yeah, it lets you pick a language, but the date formats are still probably extracted from the system for the specified locale. In other words, when you choose In our case, we'd just need to surface a drop-down to select one of the locales available in the system and use all the formatting setting stored within in. No need to make our own database. |
Isn't it better to just let the user provide the format (or just add "Custom" to the list of locales)? It gives the user more flexibility and as far as I know there is no locate that uses UTC timestamps. Being able to use timestamps in UTC is really important (and was requested in the past by other users as well, eg. #287). If you work in international team That's why I think that we should keep the ability to manually input the timestamp format or at least provide the ability to use any format using UTC (eg. I think the easiest way is to just use the system default timestamp format (from the OS) unless the user explicitly overrides it with a custom one. We can make the "Date format" textbox empty by default and add an explanation that empty textbox means OS default format. |
At the moment, we're using at least 8 different date formats at once, so no, providing them wouldn't be easier. The current textbox only controls one of the formats, which is the one used for message timestamps. The vast majority of users will not want to configure so many options. It would be easier to create an "invariant" locale that would format dates in an unambiguous format and at UTC+0. |
Fair point, it might be a better idea. |
Are you sure? No matter what I've changed in Windows, Discord formatted the timestamps solely based on my application language. |
Yes, but the region format options are pulled from the locale database installed on your system. |
Oh, now I get it, my bad. |
Either Discord has changed this or I was wrong back then, but they're definitely being formatted differently based on the user's locale now. |
Flavor
No response
Export format
No response
Details
Date format option was introduced a long time ago, where its usage was limited to message timestamps. It was introduced as a crude way to enable users to format timestamps in the export the same way they appear in their Discord client (in their respective locale).
Since then, a few things happened:
JSON.stringify(...)
in JavaScript (which is a common practice in JSON outputs).Reconciling these nuances with the existence of the date format option has become a nuisance. My suggestion is to remove the date format option and do the following instead:
The text was updated successfully, but these errors were encountered: