Category Archives: SugarCRM

SugarCRM contacts.php email1 column issue

My original post in the SugarCRM forums was titled 5.1 Contacts export file shows email1 column twice but with invalid data.

I had not looked at this for some time but it raised its head again this week and I noted that while I had issued a bug report and it has been assigned, it will not be deployed until v5.5. so I’ll need to keep making the manual changes in the various v5.1/v5.2 sites that I manage.

SugarCRM Timezones for Australia Daylight Saving

The default timezones in SugarCRM are driven by the file /include/timezone/timezones.php

With changes to the Australian Daylight Saving settings this year, the timezones.php file is incorrect.

As a side note, Trivia: When was DST first used in Australia and in which states did it apply? A: below….

All states that observe DST are now consistent in the application of dates etc. So excluding Darwin, Perth, Brisbane the other capitals can all be set for starting on the first Sunday in October and ending on the first Sunday in April each year… until they change it again!

The format for each of the cities is currently set as follows (SugarCRM 5.2.0g):
[php] 
‘Australia/Adelaide’ =>
array (
‘gmtOffset’ => 570,
‘dstOffset’ => 60,
‘dstMonth’ => 10,
‘dstStartday’ => -1,
‘dstWeekday’ => 0,
‘stdMonth’ => 3,
‘stdStartday’ => -1,
‘stdWeekday’ => 0,
‘dstStartTimeSec’ => 7200,
‘stdStartTimeSec’ => 7200,
),
[/php]
For Perth it needs to be changed to remove all DST settings leaving just the
[php]
‘gmtOffset’ => 480,
[/php]
All the other capital cities need to have the start date to the first Sunday in October and ending dates changed to April which is done by changing three values.

[php]
‘Australia/Adelaide’ =>
array (
‘gmtOffset’ => 570,
‘dstOffset’ => 60,
‘dstMonth’ => 10,
‘dstStartday’ => -1, 0,
‘stdMonth’ => 3, -1, 0,
‘dstStartTimeSec’ => 7200,
‘stdStartTimeSec’ => 7200,
),
[/php]
The use of -1 in the day field indicates the last in the month rather than 1st in the month.

This should apply to Sydney, Melbourne, Hobart, Currie*, Adelaide, Broken Hill.

A final note that applying these changes to a copy of the timezones.php and placing that under /custom/include/timezone/timezones.php does not work and you need to replace the original file in /include/timezone/timezones.php

*Where is Currie? King Island. Off the coast of Tasmania and at one stage they did not observe DST while Hobart did so they had their own setting. Redundant now.

Answer to the trivia Q: Summer 1916-1917 and it was Australia wide. It then was dropped until trialling again in 1942 – 1945 and at various other times over the next 30 years until broadly accepted around 1970 across eastern states.