NOTE: as stated, this is ONLY an issue on mobile - desktop app works correctly.
Using the following block (copied directly from our log {privatized} so you can try it)
{
"trigger_id": "87.65477428.2ef67ef300a",
"view": {
"type": "modal",
"title": {
"type": "plain_text",
"text": "Production report",
"emoji": true
},
"submit": {
"type": "plain_text",
"text": "Confirm",
"emoji": true
},
"close": {
"type": "plain_text",
"text": "Cancel",
"emoji": true
},
"blocks": [{
"type": "header",
"text": {
"type": "plain_text",
"text": "steve time test",
"emoji": true
}
}, {
"type": "section",
"text": {
"type": "plain_text",
"text": ":spiral_calendar_pad: ACTUAL TIME:",
"emoji": true
}
}, {
"type": "input",
"element": {
"type": "datetimepicker",
"action_id": "datetimepicker-start",
"initial_date_time": 1690382700
},
"label": {
"type": "plain_text",
"text": "Start",
"emoji": true
}
}, {
"type": "input",
"element": {
"type": "datetimepicker",
"action_id": "datetimepicker-end",
"initial_date_time": 1690419600
},
"label": {
"type": "plain_text",
"text": "End",
"emoji": true
}
}, {
"type": "divider"
}, {
"type": "input",
"optional": true,
"element": {
"type": "plain_text_input",
"action_id": "memo_to_crew"
},
"label": {
"type": "plain_text",
"text": ":memo: Message to the crew:",
"emoji": true
}
}]
}
}
on Desktop, viewing the exact same modal, the times are shown as per user Preferences (24 hour) Yet, on mobile, they are shown in 12 hour format (see attached)
We have followed and verified (as you can tell from the attachments) the instruction from https://slack.com/help/articles/213893898-Change-how-messages-are-displayed though changing that setting does nothing when showing this modal in the Slack mobile app (it ALWAYS shows 'US-centric' 12 hour time). In all other locations where we send data to Slack, we 'translate' these numbers so the client is happy, though in the datetimepicker (which they really like), we have to send only an 'initial_date_time' and therefore we have no control over how the date is displayed.
I have reported this to Slack (ticket 4961443)
Heard from "Richard", a "Sr. Platform Support Agent" at Slack.
I managed to reproduce this. It seems that the timepicker and datetimepicker render the time based on the format selected in the iOS System Settings instead of the format selected in the Slack App Preferences. I have reported this to the engineers to address but I'm afraid I don't have a timeline on how long that may take. I shall be sure to update you here as soon as there's any word on it.
I changed the setting on my phone - and VOILA! - it updated the modal data as set in the iOS System Settings...
This isn't a "fix" IMHO (that would need to either work as documented - or change the documents!) though it is an 'answer' to how to make it work!