Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Different user different timezone

Questions related to using nuBuilder Forte.
Post Reply
incoherence
Posts: 22
Joined: Sun May 08, 2022 2:36 pm
Has thanked: 9 times
Been thanked: 1 time

Different user different timezone

Unread post by incoherence »

Hi,

I see that there is a timezone setting in the "Setup" - is that applied to all users of the system globally?

If the different users of the system are in different timezones, what is the recommended way to make nuBuilder display dates and times in their local timezone?

I do not see any per-user timezone setting in zzzzsys_user for example (that could be used to allow users to set their preferred timezone themselves).

(Do PHP or MySQL etc. perform any date/time conversion that would help (or interfere!) with this and, if so, what (timezone/setting) do they base the conversion on?).
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Different user different timezone

Unread post by kev1n »

nuBuilder sets the timezone that is set under Setup -> Settings by running

Code: Select all

SET time_zone = ...
Documentation can be found here:
https://dev.mysql.com/doc/refman/8.0/en ... pport.html

A timezone per user is currently not supported and careful consideration must be given to how this is to be implemented.

When storing dates in a database, one way is to store them in UTC format and then convert them to the desired timezone when displaying them to the user. This ensures that the date and time are consistent across all timezones and eliminates any issues with daylight saving time.

Also see "Best way to handle storing/displaying dates in different timezones in PHP?"

https://softwareengineering.stackexchan ... s-in-mysql

and

https://softwareengineering.stackexchange.com/a/366744
Post Reply