Macrotone Blogs

Macrotone blogs upon Joomla, our products and other matters.

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.

Bootstrap templates width of 'Text Area' boxes.

b2ap3 icon joomlaWe have been looking at the size of the 'Text Area' boxes displayed within the Isis back end template and the Protostar front end template and wondering how to increase the width so that it maximises the available space as opposed to being restricted to the small (approx 200px) size.

Attempts to specify the number of rows and columns made no difference and searching the web didn't reveal any solution.

So we are sharing the 'fix' for the 'width' text area boxes which achieves what we were trying to achieve.

In the form definition XML file navigate to the appropriate 'textarea' field, and then modify the 'class' entry (or add one if it doesn't have one) to the following:

class="inputbox textarea-span"

The important bit is the 'textarea-span' after the inputbox.  We have tried specify specific span sizes after the 'span' but these do not make any difference.  i.e. span6, span8 etc.

Once the from is refreshed then the boxes will occupy what ever width is available.  This works with Isis and Protostar templates, so should work with any Bootstrap based templates.

Go To Top

Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries