Deprecated: Joomla\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /homepages/13/d380392445/htdocs/Jlive/libraries/vendor/joomla/input/src/Input.php on line 41

Deprecated: Return type of Joomla\Input\Input::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/13/d380392445/htdocs/Jlive/libraries/vendor/joomla/input/src/Input.php on line 170

Deprecated: Joomla\CMS\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /homepages/13/d380392445/htdocs/Jlive/libraries/src/Input/Input.php on line 31

Deprecated: Joomla\CMS\Input\Cookie implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /homepages/13/d380392445/htdocs/Jlive/libraries/src/Input/Cookie.php on line 21

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /homepages/13/d380392445/htdocs/Jlive/libraries/src/Uri/Uri.php on line 141
Joomla date/time displays and Database vales. - Macrotone Blogs

Macrotone Blogs

Macrotone blogs upon Joomla, our products and other matters.
Font size: +

Joomla date/time displays and Database vales.

b2ap3 icon joomlaHave been looking at an interesting problem of the display of date/time values on Joomla screens.

First it is apparent from looking at the database stored values that Joomla stores all of the date/time values (calendar) in the database as UTC values, which means that all of the stored values are consistent.

However when these are displayed upon a form or in a tabular form, care has to be taken that the format of the values is consistent.  For example if the displayed value is shown as a ‘text’ field, the values stored in the database (UTC) is displayed, which is not necessarily the ‘local’ time.  We are in the London area and currently are using DST (Daylight saving time) which is an hour ahead of UTC (GMT – Greenwich Mean Time) .  One has to make consistent use of the ‘calendar’ type and if necessary make it read-only, thus ensuring the correct value, suitably converted is displayed.

Another complication that we have not yet worked out the cause of is that if using JForm with the calendar type and using the default of ‘NOW’ which should display the local time (according to the documentation),  it displays a time value 8 hours ahead of the local time.  Where is gets that from I am not sure.  i.e.  If local time is 11:30m, the ‘now’ value as determined by the JForm default shows as 19:30.  Go figure!  It was necessary therefore for us to specify the default value as empty and assign a default value in the view based upon the local time so that the form value is correct.

We have therefore decided that to avoid confusion all date/time values should be displayed using local time.

Rush Job Calendar
CSS: Text wrapping in a table cell. Part 2
 
Go To Top

Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries