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

Add support for setting timezone on DateTimePicker input #1753

Open
brunano21 opened this issue Feb 27, 2023 · 10 comments
Open

Add support for setting timezone on DateTimePicker input #1753

brunano21 opened this issue Feb 27, 2023 · 10 comments
Labels
auto-triage-skip Prevent this issue from being closed due to lack of activity enhancement M-T: A feature request for new functionality server-side-issue

Comments

@brunano21
Copy link

Reproducible in:

The Slack SDK version

"slack/bolt": "^3.12.2",
"slack/web-api": "^6.8.1"

or refer to your package.json

Node.js runtime version

node v16.14.0

OS info

ProductName:		macOS
ProductVersion:		13.2
BuildVersion:		22D49

Steps to reproduce:

As shown in the picture below, I have set a specific timezone in my Slack App settings.
image

My OS timezone is:

❯ sudo systemsetup -gettimezone
Time Zone: Europe/Dublin

When using the DateTimePicker input, the timezone displayed under the time-picker differs from what we have set in the User Preferences.

image

Because of this, the input's initial_date_time value is wrong and not respecting Slack's user-preferred timezone.

Also, the DateTimePicker input timezone field cannot be set/unset and it's always displayed - this does not happen for a Timepicker instance

Expected result:

The DateTimePicker should use the User Preferences' timezone, instead of the OS's one.

Actual result:

The DateTimePicker parses the initial_date_time value using the wrong timezone.

@brunano21 brunano21 changed the title User preferred timezone is not used/applied for the DateTimePicker input. User preferred timezone is honored for the DateTimePicker input. Feb 27, 2023
@brunano21 brunano21 changed the title User preferred timezone is honored for the DateTimePicker input. User preferred timezone isn't honoured for the DateTimePicker input. Feb 27, 2023
@filmaj
Copy link
Contributor

filmaj commented Feb 27, 2023

Hey @brunano21 , thanks for writing in.

I am not 100% sure this is a bug - as the setting elaborates in the help-text under the input in the screenshot you posted, the Slack-specified timezone is used for only three things.

I have posed this question internally to clarify whether the timezone should be based on system time or the Slack preference setting. Once I have more info I'll report back.

@filmaj filmaj added question M-T: User needs support to use the project and removed untriaged labels Feb 27, 2023
@brunano21
Copy link
Author

Hi @filmaj, thanks for getting back.

As per my understanding, the timezone settings are used, for example, for formatting all messages' timestamps. So I would expect that the same would occur for formatting the initial value of the DateTimePicker.

@filmaj
Copy link
Contributor

filmaj commented Feb 28, 2023

As per my understanding, the timezone settings are used, for example, for formatting all messages' timestamps.

Did that work for you? I tried changing my timezone settings in my Slack client and restarting it, and it didn't change any (visible) message timestamps 🤔

@brunano21
Copy link
Author

brunano21 commented Feb 28, 2023

Yes, you are right. However, I wonder how I can enforce a specific timezone for formatting the initial_date_time value - which is meant to be a UNIX timestamp in seconds.

In regards to this

Also, the DateTimePicker input timezone field cannot be set/unset and it's always displayed - this does not happen for a Timepicker instance

... Is there any way to hide the help text?

Check out this DateTimePicker vs TimePicker example

@filmaj
Copy link
Contributor

filmaj commented Feb 28, 2023

FYI I am still looking into / chasing down confirmation into exactly how all this works - as soon as I find more info I'll report back here.

The DateTimePicker does not support the timezone field as far as I can tell - see its Fields docs. However, the TimePicker does! It makes sense to me to also expose a timezone field for DateTimePicker. I will bring this up internally and file an issue - appreciate your link to blockkit builder, that is very helpful!

@filmaj
Copy link
Contributor

filmaj commented Feb 28, 2023

Update here: I have confirmation that the timezone for all Block Kit elements should be based on computer/system time, not based on the timezone set in Slack preferences.

Also: there is consensus that the DateTimePicker element should have the ability to customize its timezone, just like the TimePicker element. I will update this issue title to reflect that, and keep this issue open. When I hear back on when support for this lands, I will update/close this issue!

@filmaj filmaj changed the title User preferred timezone isn't honoured for the DateTimePicker input. Add support for setting timezone on DateTimePicker input Feb 28, 2023
@filmaj filmaj added auto-triage-skip Prevent this issue from being closed due to lack of activity and removed question M-T: User needs support to use the project labels Feb 28, 2023
@oneubauer
Copy link

hello, 👋
Wondering if there is any movement on this? We are also in need of having a timezone definable in the element.

@filmaj
Copy link
Contributor

filmaj commented Aug 22, 2023

Hello @oneubauer ! This addition is still in the backlog and has not been prioritized to address at this time. I have raised the fact you have also expressed interest in this issue with the relevant team in the hopes that more voices = more prioritization. If/when I see movement on this feature internally, I will certainly update this issue thread.

@filmaj filmaj added the enhancement M-T: A feature request for new functionality label Aug 22, 2023
@edel-macias-cubix
Copy link

Hello. I'd like to express interest in this feature to have it available at least as a block. Having this new block but being unable to use it as expected from the other related timepicker and datepicker really detracts from its usage.
Thank you

@MocniMis
Copy link

Hi, I have the same issue.
And one more thing, timezone info below the picker should have the option to hide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-triage-skip Prevent this issue from being closed due to lack of activity enhancement M-T: A feature request for new functionality server-side-issue
Projects
None yet
Development

No branches or pull requests

5 participants