Date and Time

Parent Previous Next

All dates in the component are stored in UTC time zone and shown them to users according to their time zone. If it is a registered users, time zone gets from user profile. For unregistered users time zone gets from Joomla! global configuration.



Examples



For example server time zone is set to "Australia/Sydney" (UTC +10:00), time zone is set to "- Use default -" in user profile of "admin1" user and time zone is set to "Europe/London" (UTC +01:00) in user profile of "admin2" user.



1.An unregistered user completes a quiz at "10 August 2012 10:25 AM". Server time zone ("Australia/Sydney") will be used for this date and it will be stored into database as "10 August 2012 00:25 AM" (it is UTC date). When "admin1" open quizzes results page on component backend, s/he sees "10 August 2012 10:25 AM" because quiz end date which is stored into database will be converted to "Australia/Sydney" time zone. "admin2" sees "10 August 2012 01:25 AM" date because quiz end date which is stored into database will be converted to "Europe/London".


2.If a user changes their time zone in user profile, s/he sees all dates according to a new time zone.