spacer
  • CiviCRM
  • CRM-9683

Implement timezone support for CiviMail

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: spacer Improvement
  • Status: spacer Open
  • Priority: spacer Minor
  • Resolution: Unresolved
  • Affects Version/s: 4.1.0
  • Fix Version/s: 4.4
  • Component/s: CiviMail
  • Labels:
    None
  • Is MIH?:
    No
  • Code Sprint:
    Yes

Description

Currently CiviCRM saves time in the DB according to user time & in some cases this is ahead of server time - causing delays in CiviMail.

In testing I had success using the mysql date handling to work around this - see

forum.civicrm.org/index.php/topic,23411.msg98329.html#msg98329

Note that I have tested in CiviMail for Drupal6. I would expect similar to work in D7 & Joomla & across the code base.

Also Tim found some timezone handling in the php code in group_contact_cache so that would need to be removed if mysql is handling timezones

Activity

    All Comments Work Log History Activity Commits Source Reviews
Hide
Permalink
Eileen McNaughton added a comment -
Just adding some notes on how we are doing this as I want to be able to point someone to it

These are the d6 & d7 patches for this


https://github.com/fuzionnz/civicrm/commit/28b97d73232e8a61e9f2a0890cbf26f860742618
https://github.com/fuzionnz/civicrm/commit/0c9df257195c1deb96601c1dfc3d85131ecbfa3d

With these patches in place you simply do

ALTER TABLE `civicrm_mailing`
CHANGE COLUMN `created_date` `created_date` TIMESTAMP NULL DEFAULT NULL COMMENT 'Date and time this mailing was created.' AFTER `created_id`,
CHANGE COLUMN `scheduled_date` `scheduled_date` TIMESTAMP NULL DEFAULT NULL COMMENT 'Date and time this mailing was scheduled.' AFTER `scheduled_id`,
CHANGE COLUMN `approval_date` `approval_date` TIMESTAMP NULL DEFAULT NULL COMMENT 'Date and time this mailing was approved.' AFTER `approver_id`;


It's possible my practice of rebasing will make the above links invalid - in which case you need to go to these links to find them

https://github.com/fuzionnz/civicrm/tree/4.2-d7
https://github.com/fuzionnz/civicrm/tree/4.2-d6

Of course I would more the functions onto the CRM_Utils_System_ classes if this were put in core and the missing piece of work is to find appropriate Joomla! & WordPress equivalents and / or a suitable function for the base class.



Show
Eileen McNaughton added a comment - Just adding some notes on how we are doing this as I want to be able to point someone to it These are the d6 & d7 patches for this https://github.com/fuzionnz/civicrm/commit/28b97d73232e8a61e9f2a0890cbf26f860742618 https://github.com/fuzionnz/civicrm/commit/0c9df257195c1deb96601c1dfc3d85131ecbfa3d With these patches in place you simply do ALTER TABLE `civicrm_mailing` CHANGE COLUMN `created_date` `created_date` TIMESTAMP NULL DEFAULT NULL COMMENT 'Date and time this mailing was created.' AFTER `created_id`, CHANGE COLUMN `scheduled_date` `scheduled_date` TIMESTAMP NULL DEFAULT NULL COMMENT 'Date and time this mailing was scheduled.' AFTER `scheduled_id`, CHANGE COLUMN `approval_date` `approval_date` TIMESTAMP NULL DEFAULT NULL COMMENT 'Date and time this mailing was approved.' AFTER `approver_id`; It's possible my practice of rebasing will make the above links invalid - in which case you need to go to these links to find them https://github.com/fuzionnz/civicrm/tree/4.2-d7 https://github.com/fuzionnz/civicrm/tree/4.2-d6 Of course I would more the functions onto the CRM_Utils_System_ classes if this were put in core and the missing piece of work is to find appropriate Joomla! & WordPress equivalents and / or a suitable function for the base class.

People

  • Assignee:
    Donald A. Lobo
    Reporter:
    Eileen McNaughton
Vote (0)
Watch (1)

Dates

  • Created:
    Updated: