Closed philipsc closed 4 years ago
Hi. I'm not sure I understand your request.
Are you talking about the format used to enter the date in the policy? What's your suggestion?
Whatever format you enter the date, it's parsed and then stored as a database timestamp in your server timezone.
When the date is displayed back in the accept terms modal, we use the format chosen in the settings, which usually uses the browser local timezone.
When we display the accept date, we show both the date with the format from the settings and the raw date from the API, which Flarum returns as timezone 00:00
First of all thank you for your reply.
I chose to display the date format in ‘Terms Settings’ as ‘YYYY-MM-DD HH:mm:ss’.
But the acceptance date and update date format displayed on the user terminal are inconsistent, like this, how should I solve it?
Actually I'm unsure why we (that's to say, "I" I suppose) used the same date format to show the "accepted at" value. I think we should just hard-code a format for everyone. That value is only visible to admins after all.
The reason there are currently two values shown is because in case the chosen date format isn't super precise, I still wanted a way to see the full date. And while the formatted date accounts for the user time zone, the full date is always shown in timezone "Zulu"/00:00
We could switch to using Flarum's humanTime
helper in the "state modal", that way it's consistent with the date shown in other places in Flarum.
Ok i understand, thanks for your reply
I have made the change in the newly released version 0.4.3
Now it's just like this
And the date can be hovered with the mouse to see the not-human-formatted version.
Whether the TOS update date can use the local date. If you use the world coordination, it may cause the user to see the agreement modification date and the actual date. like this:
![](https://cdn.jsdelivr.net/gh/philipsc/UP@latest/2020/07/07/144f9da4874a286a69f2ca47c0e70aac.png)