aleksey-hoffman / sigma-file-manager

"Sigma File Manager" is a free, open-source, quickly evolving, modern file manager (explorer / browser) app for Windows and Linux.
https://sigma-file-manager.vercel.app
Other
4.35k stars 161 forks source link

Date and time format #188

Closed skycommand closed 2 years ago

skycommand commented 2 years ago

Is there an existing issue for this?

Problem description

The app doesn't respect regional settings and the user's preferences regarding the date and time formats. Instead, it uses the following settings:

Steps to reproduce

Just open the app and look at any date field.

Environment

Notes

Since this is a Windows app, you can have Windows format the date and time for you. Depending on which API you are using, it could be as easy as this:

return DateTime.Now.ToString("D"); //In my computer, returns 18 Aug 2022, Thu

The ToString function accepts "F", "f", "D", "d", "G", and "g".

Here are two sets of documentation, in case you need them: .NET and Windows API

github-actions[bot] commented 2 years ago

Consider supporting the developer to increase priority of all your issues and get other rewards.
Patreon page: https://www.patreon.com/sigma_file_manager

aleksey-hoffman commented 2 years ago

Hi, thanks for the feedback It's already supposed to use your system default locale to format date and time. It seems your system also has en-US locale installed and Sigma uses that as the default.

If you'd like to help me debug this so I can fix it, please do the following:

In your browser, right on this page, press Ctrl + Shift + I then go to Console tab and then run the following line of code there: window.navigator.languages

Then please show me the result.

skycommand commented 2 years ago

It's already supposed to use your system default locale to format date and time. It seems your system also has en-US locale installed and Sigma uses that as the default.

No, it doesn't. Here is a screenshot.

My regional settings

And in PowerShell, I get this:

PS C:\> [System.Threading.Thread]::CurrentThread.CurrentCulture

LCID             Name             DisplayName
----             ----             -----------
4096             en-001           English (World)

In your browser, right on this page, press Ctrl + Shift + I then go to Console tab and then run the following line of code there: window.navigator.languages

That's a strange request, but I oblige. Here:

My browser's regional settings

I asked my colleagues about this request. Browsers do not adhere to OS regional settings for privacy and customization reasons. (The only exception is Internet Explorer.) I can go to Firefox or Microsoft Edge's options and change the outcome of this JavaScript command.

aleksey-hoffman commented 2 years ago

Thanks, mate. I found out that the function, that I'm using, formats en locale as en-US, rather than en-GB I'm gonna add the ability to choose any date / time format, in the next update

aleksey-hoffman commented 2 years ago

Fixed in 89eaa9a Will be released in v1.6 update

image