Answers.Body: <p>Unfortunately, there are still issues with timezones in CiviCRM, it's complicated, and you'll see lots of solutions to different and somewhat unrelated timezone related issues.</p>
  <p>The short answer to your issue is probably to convert your mysql to use universal time instead of local time, it looks like CiviCRM php code is assuming that.</p>
  <p>CiviCRM itself doesn't have a timezone setting (reasonably!), though it can (or at least, in the past it did) borrow individual and default timezone presentation default timezones from the CMS. Yes, very confusing.</p>
  <p>The other angle you might try is the use of the Doctor When extension, which does some work to untangle the timezone problem in some places by converting timestamp fields to date-time fields in the mysql tables.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-11-26T23:21:32.697Z
Answers.Text: Thanks, @AlanDixon See my answer.
Answers.UserDisplayName: Jobst
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-11-25T16:48:07.283Z
Answers.LastActivityDate: 2024-11-25T16:48:07.283Z
Answers.UserDisplayName: Alan Dixon
Answers.Body: <p>To be able to use CiviCRM with proper times in calendar/scheduling I had to start from PHP.</p>
  <p>In php.ini I had the timezone set to Australia/Melbourne.
  My first steop I took this out, then tested CiviCRM and indeed CiviCRM now has the correct times.</p>
  <p>Because I have many OTHER softwares running on the system (non wordpress) I had to include</p>
  <pre><code>// taken out in php.ini. set it here.
  date_default_timezone_set('Australia/Melbourne');
  </code></pre>
  <p>I will keep adding this to other softwares requiring this after I took it out from php.ini</p>
  <p>I checked SuiteCRM and a CALDAV server on the system, I added the line to the caldav server, so far so good.</p>
  <p>Scheduling a Mailing, saving a Mailing etc have now the correct times set and sending of the Mailing now happens at the correct time.</p>
  <p>Not that I wanted the extra effort but I want to support CiviCRM.</p>
  <p>I hate Nationbuilder with a passion, their system language - liquid - is stuck in the 2010s.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-11-28T18:01:58.217Z
Answers.Text: FWIW, I've got my php default timezone reported as America/Toronto, but I don't set it in my .ini file, so I suspect it's getting set by Drupal. I think most responsible systems shouldn't use or require a system setting for the timezone (in order to support cloud providers as much as anything), but that's easy for me to say! Thanks for supporting CiviCRM.
Answers.UserDisplayName: Alan Dixon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-11-26T23:31:42.813Z
Answers.LastActivityDate: 2024-11-26T23:31:42.813Z
Answers.UserDisplayName: Jobst
Body: <p>I am having problems sending mailings/campaigns.</p>
  <p>The following works:</p>
  <ul>
  <li>bounce handling account is correctly set, successfully tested</li>
  <li>cron job is running correctly (no errors, I can also see it in the logs)</li>
  <li>the default email for sending is set to the same as bounce handling account</li>
  <li>username/password all correct, access is through imap</li>
  <li>sending details are all correct</li>
  <li>selecting a contact (like one with one of MY email addresses) I can send a direct email to it with EITHER the logged in user OR the main email address, both arrive</li>
  <li>there is NO error reported in system status related to any of this (other than PHP)</li>
  </ul>
  <p>So for testing I create a Mailing:</p>
  <ul>
  <li>just mailname</li>
  <li>no campaign/template</li>
  <li>from same as bounce</li>
  <li>recipients set to a group of MY email addresses I know work</li>
  <li>a subject and a couple of lines in body</li>
  </ul>
  <p>If I use &quot;send immediately&quot; it yells at me &quot;Error: the scheduled time is in the past&quot;.
  When I check the times it tells me:</p>
  <ul>
  <li>the mailing was created November 24th, 2024 5:02 AM</li>
  <li>BUT it's currently 16:08 in the afternoon - the scheduled time
  is about 3 minutes behind but ALSO in the past.</li>
  </ul>
  <p>My time zone of the CMS is Melbourne.
  Where do I set the timezone in CIVICRM?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-11-24T06:15:41.243Z
Comments.Text: When I do "mysql> select now();" it reports the CORRECT time, so the MYSQL server knows what time it is with respect to the timezone.
  
  However when I check the systemstatus in CIVICRM it tells me
  Timestamps reported by MySQL (eg "2024-11-24 06:14") and PHP (eg "2024-11-24 17:14" ) are mismatched.
Comments.UserDisplayName: Jobst
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-11-25T16:49:02.350Z
Comments.Text: CiviCRM can be rude!
Comments.UserDisplayName: Alan Dixon
Tags: <civimail><mailing><timezone>
Title: I am having real problems sending Mailing/Campaigns
ThreadText: # I am having real problems sending Mailing/Campaigns
  
  (Asked by: username_0 on 2024-11-24)
  
  I am having problems sending mailings/campaigns.
  
  The following works:
  
  * bounce handling account is correctly set, successfully tested
  * cron job is running correctly (no errors, I can also see it in the logs)
  * the default email for sending is set to the same as bounce handling account
  * username/password all correct, access is through imap
  * sending details are all correct
  * selecting a contact (like one with one of MY email addresses) I can send a direct email to it with EITHER the logged in user OR the main email address, both arrive
  * there is NO error reported in system status related to any of this (other than PHP)
  
  So for testing I create a Mailing:
  
  * just mailname
  * no campaign/template
  * from same as bounce
  * recipients set to a group of MY email addresses I know work
  * a subject and a couple of lines in body
  
  If I use "send immediately" it yells at me "Error: the scheduled time is in the past".
  When I check the times it tells me:
  
  * the mailing was created November 24th, 2024 5:02 AM
  * BUT it's currently 16:08 in the afternoon - the scheduled time
    is about 3 minutes behind but ALSO in the past.
  
  My time zone of the CMS is Melbourne.
  Where do I set the timezone in CIVICRM?
  
  **Tags:** civimail, mailing, timezone
  
  > **Comments:**
  > **username_0**: When I do "mysql> select now();" it reports the CORRECT time, so the MYSQL server knows what time it is with respect to the timezone.  However when I check the systemstatus in CIVICRM it tells me Timestamps reported by MySQL (eg "2024-11-24 06:14") and PHP (eg "2024-11-24 17:14" ) are mismatched.  
  > **username_1**: CiviCRM can be rude!  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2024-11-25. Score: 3
  
  Unfortunately, there are still issues with timezones in CiviCRM, it's complicated, and you'll see lots of solutions to different and somewhat unrelated timezone related issues.
  
  The short answer to your issue is probably to convert your mysql to use universal time instead of local time, it looks like CiviCRM php code is assuming that.
  
  CiviCRM itself doesn't have a timezone setting (reasonably!), though it can (or at least, in the past it did) borrow individual and default timezone presentation default timezones from the CMS. Yes, very confusing.
  
  The other angle you might try is the use of the Doctor When extension, which does some work to untangle the timezone problem in some places by converting timestamp fields to date-time fields in the mysql tables.
  
  > **Comments:**
  > **username_0**: Thanks, @AlanDixon See my answer.  
  
  ---
  
  ### Answer by username_0 on 2024-11-26. Score: 3
  
  To be able to use CiviCRM with proper times in calendar/scheduling I had to start from PHP.
  In php.ini I had the timezone set to Australia/Melbourne.
  My first steop I took this out, then tested CiviCRM and indeed CiviCRM now has the correct times.
  Because I have many OTHER softwares running on the system (non wordpress) I had to include
  // taken out in php.ini. set it here.
  date_default_timezone_set('Australia/Melbourne');
  
  I will keep adding this to other softwares requiring this after I took it out from php.ini
  I checked SuiteCRM and a CALDAV server on the system, I added the line to the caldav server, so far so good.
  Scheduling a Mailing, saving a Mailing etc have now the correct times set and sending of the Mailing now happens at the correct time.
  Not that I wanted the extra effort but I want to support CiviCRM.
  I hate Nationbuilder with a passion, their system language - liquid - is stuck in the 2010s.
  
  > **Comments:**
  > **username_1**: FWIW, I've got my php default timezone reported as America/Toronto, but I don't set it in my .ini file, so I suspect it's getting set by Drupal. I think most responsible systems shouldn't use or require a system setting for the timezone (in order to support cloud providers as much as anything), but that's easy for me to say! Thanks for supporting CiviCRM.  
  
  ---
  
  