Skip to content

Commit

Permalink
CRM-9683 implement timezone support for CiviMail
Browse files Browse the repository at this point in the history
This will affect new installs only per discussion on the ticket. Motivation dependent, we could add a method to convert on existing installs.

Note some fields, like event_start_date might have a case for being in a non-timezone aware format
  • Loading branch information
eileenmcnaughton committed Apr 23, 2017
1 parent 8639c83 commit 4387c66
Show file tree
Hide file tree
Showing 15 changed files with 61 additions and 21 deletions.
7 changes: 5 additions & 2 deletions xml/schema/Core/Cache.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,16 @@
</foreignKey>
<field>
<name>created_date</name>
<type>datetime</type>
<type>timestamp</type>
<default>CURRENT_TIMESTAMP</default>
<comment>When was the cache item created</comment>
<add>2.1</add>
</field>
<field>
<name>expired_date</name>
<type>datetime</type>
<type>timestamp</type>
<default>NULL</default>
<required>false</required>
<comment>When should the cache item expire</comment>
<add>2.1</add>
</field>
Expand Down
3 changes: 2 additions & 1 deletion xml/schema/Core/Job.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@
</field>
<field>
<name>last_run</name>
<type>datetime</type>
<type>timestamp</type>
<default>NULL</default>
<required>false</required>
<comment>When was this cron entry last run</comment>
<add>4.1</add>
</field>
Expand Down
3 changes: 2 additions & 1 deletion xml/schema/Mailing/Event/Bounce.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
<field>
<name>time_stamp</name>
<title>Timestamp</title>
<type>datetime</type>
<type>timestamp</type>
<default>CURRENT_TIMESTAMP</default>
<required>true</required>
<comment>When this bounce event occurred.</comment>
</field>
Expand Down
3 changes: 2 additions & 1 deletion xml/schema/Mailing/Event/Confirm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
<field>
<name>time_stamp</name>
<title>Confirm Timestamp</title>
<type>datetime</type>
<type>timestamp</type>
<default>CURRENT_TIMESTAMP</default>
<required>true</required>
<comment>When this confirmation event occurred.</comment>
</field>
Expand Down
3 changes: 2 additions & 1 deletion xml/schema/Mailing/Event/Delivered.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
<field>
<name>time_stamp</name>
<title>Timestamp</title>
<type>datetime</type>
<type>timestamp</type>
<default>CURRENT_TIMESTAMP</default>
<required>true</required>
<comment>When this delivery event occurred.</comment>
</field>
Expand Down
3 changes: 2 additions & 1 deletion xml/schema/Mailing/Event/Forward.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
<field>
<name>time_stamp</name>
<title>Timestamp</title>
<type>datetime</type>
<type>timestamp</type>
<default>CURRENT_TIMESTAMP</default>
<required>true</required>
<comment>When this forward event occurred.</comment>
</field>
Expand Down
3 changes: 2 additions & 1 deletion xml/schema/Mailing/Event/Opened.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
<field>
<name>time_stamp</name>
<title>Timestamp</title>
<type>datetime</type>
<type>timestamp</type>
<default>CURRENT_TIMESTAMP</default>
<required>true</required>
<comment>When this open event occurred.</comment>
</field>
Expand Down
3 changes: 2 additions & 1 deletion xml/schema/Mailing/Event/Reply.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
<field>
<name>time_stamp</name>
<title>Reply Timestamp</title>
<type>datetime</type>
<type>timestamp</type>
<default>CURRENT_TIMESTAMP</default>
<required>true</required>
<comment>When this reply event occurred.</comment>
</field>
Expand Down
3 changes: 2 additions & 1 deletion xml/schema/Mailing/Event/Subscribe.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
<field>
<name>time_stamp</name>
<title>Mailing Subscribe Timestamp</title>
<type>datetime</type>
<type>timestamp</type>
<default>CURRENT_TIMESTAMP</default>
<required>true</required>
<comment>When this subscription event occurred.</comment>
</field>
Expand Down
3 changes: 2 additions & 1 deletion xml/schema/Mailing/Event/TrackableURLOpen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
<field>
<name>time_stamp</name>
<title>Timestamp</title>
<type>datetime</type>
<type>timestamp</type>
<default>CURRENT_TIMESTAMP</default>
<required>true</required>
<comment>When this trackable URL open occurred.</comment>
</field>
Expand Down
3 changes: 2 additions & 1 deletion xml/schema/Mailing/Event/Unsubscribe.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
<field>
<name>time_stamp</name>
<title>Unsubscribe Timestamp</title>
<type>datetime</type>
<type>timestamp</type>
<default>CURRENT_TIMESTAMP</default>
<required>true</required>
<comment>When this delivery event occurred.</comment>
</field>
Expand Down
21 changes: 18 additions & 3 deletions xml/schema/Mailing/Mailing.xml
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,15 @@
</foreignKey>
<field>
<name>created_date</name>
<type>datetime</type>
<type>timestamp</type>
<default>CURRENT_TIMESTAMP</default>
<required>false</required>
<title>Mailing Created Date</title>
<comment>Date and time this mailing was created.</comment>
<add>3.0</add>
<html>
<type>Select Date</type>
<formatType>activityDateTime</formatType>
</html>
</field>
<field>
Expand All @@ -293,10 +296,16 @@
</foreignKey>
<field>
<name>scheduled_date</name>
<type>datetime</type>
<type>timestamp</type>
<default>NULL</default>
<required>false</required>
<title>Mailing Scheduled Date</title>
<comment>Date and time this mailing was scheduled.</comment>
<add>3.3</add>
<html>
<type>Select Date</type>
<formatType>activityDateTime</formatType>
</html>
</field>
<field>
<name>approver_id</name>
Expand All @@ -312,10 +321,16 @@
</foreignKey>
<field>
<name>approval_date</name>
<type>datetime</type>
<type>timestamp</type>
<default>NULL</default>
<required>false</required>
<title>Mailing Approved Date</title>
<comment>Date and time this mailing was approved.</comment>
<add>3.3</add>
<html>
<type>Select Date</type>
<formatType>activityDateTime</formatType>
</html>
</field>
<field>
<name>approval_status_id</name>
Expand Down
4 changes: 3 additions & 1 deletion xml/schema/Mailing/MailingAB.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@
<field>
<name>created_date</name>
<title>AB Test Created Date</title>
<type>datetime</type>
<type>timestamp</type>
<required>false</required>
<default>CURRENT_TIMESTAMP</default>
<comment>When was this item created</comment>
<add>4.6</add>
<html>
Expand Down
12 changes: 9 additions & 3 deletions xml/schema/Mailing/MailingJob.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,25 @@
<field>
<name>scheduled_date</name>
<title>Mailing Scheduled Date</title>
<type>datetime</type>
<type>timestamp</type>
<default>NULL</default>
<required>false</required>
<comment>date on which this job was scheduled.</comment>
</field>
<field>
<name>start_date</name>
<title>Mailing Job Start Date</title>
<type>datetime</type>
<type>timestamp</type>
<default>NULL</default>
<required>false</required>
<comment>date on which this job was started.</comment>
</field>
<field>
<name>end_date</name>
<title>Mailing Job End Date</title>
<type>datetime</type>
<type>timestamp</type>
<default>NULL</default>
<required>false</required>
<comment>date on which this job ended.</comment>
</field>
<field>
Expand Down
8 changes: 6 additions & 2 deletions xml/schema/Mailing/Spool.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,17 @@
<field>
<name>added_at</name>
<title>Added</title>
<type>datetime</type>
<type>timestamp</type>
<required>false</required>
<default>NULL</default>
<comment>date on which this job was added.</comment>
</field>
<field>
<name>removed_at</name>
<title>Removed</title>
<type>datetime</type>
<type>timestamp</type>
<required>false</required>
<default>NULL</default>
<comment>date on which this job was removed.</comment>
</field>
</table>

0 comments on commit 4387c66

Please sign in to comment.