Answers.Body: <p>I would look at the <code>scheduled_date</code> on the mailings in your database:
  <code>
  SELECT name,scheduled_date FROM civicrm_mailing;
  </code>
  If the scheduled_date is off, then it might be that MySQL has a time mismatch - or that specific users in Joomla have a different timezone setting than the default (not sure if this is possible in Joomla, but it can be done in WordPress/Drupal).</p>
  
  <p>If the <code>scheduled_date</code> is correct, then I'd check to see that your cron user is running in the same time zone.  E.g. if cron is triggered by <code>root</code> and not the web server user, I'd expect this sort of issue to creep in.</p>
  
  <p>EDIT: You mention that you're running cron via the "cli.php" tool.  That means that PHP is using a different <code>php.ini</code> file than when you do web-based PHP, and your timezone might be different.  If you have terminal access, check your timezone with <code>php -i | grep zone</code>.</p>
  
  <p>Since you're using Siteground, I doubt they allow you to control the <code>php.ini</code> timezone.  Since that's the case, I would recommend using the <a href="https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#http" rel="nofollow noreferrer">HTTP Method</a> of running cron, which will set the timezone based on the web-based timezone.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-02T19:33:12.393Z
Answers.Text: Thanks for your answer. I looked at the scheduled date, and that was fine. SiteGround have confirmed that the server time is 5 hours behind. I don't understand how to investigate the second part of your answer. Could you explain further? Thanks.
Answers.UserDisplayName: John A
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-03T05:52:33.110Z
Answers.Text: Do you know how your cron is set up?  If so, please give more detail and I can give you suggestions on investigating further.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-03T13:00:31.070Z
Answers.Text: Cron runs from the from SiteGround cpanel: "php /home/site/public_html/administrator/components/com_civicrm/civicrm/bin/cli.php \-u user \-p pwd \-e Job \-a execute".
Answers.UserDisplayName: John A
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-05T15:17:05.193Z
Answers.Text: @JohnA See my edit above.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-06T12:20:35.790Z
Answers.Text: Thanks Ed. Have tried this. Used the command : https://<URL>/administrator/components/com_civicrm/civicrm/bin/cron.php?name=username&pass=pwd&key=key  but email says"https://<URL>/administrator/components/com_civicrm/civicrm/bin/cron.php?name=username" no such file or directory. I can't get the syntax quite right.
Answers.UserDisplayName: John A
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-02T15:00:04.370Z
Answers.LastActivityDate: 2018-03-05T15:16:54.637Z
Answers.LastEditDate: 2018-03-05T15:16:54.637Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>Using CiviMail  in Civi 4.7.29, any bulk email is delayed by 5 hours. The cron commands are received every 30 minutes, and are acknowledged by Civi on the status page. Have checked that php, joomla and civi are all set to London time zone. These are small test mailings of about six users. Any ideas?
  Thanks in anticipation.
  John</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-21T17:18:38.847Z
Comments.Text: I have learnt enough, I think, after 6 months to solve my problem. I inserted a single line in clip.php:  "date_default_timezone_set("Europe/London");" and now emails are sent straight away. This is probably obvious, but it took me so long to find a solution.
Comments.UserDisplayName: John A
Tags: <joomla><cron><mailing>
Title: Why are all bulk mailings delayed by 5 hours?
ThreadText: # Why are all bulk mailings delayed by 5 hours?
  
  (Asked by: username_0 on 2018-03-02)
  
  Using CiviMail in Civi 4.7.29, any bulk email is delayed by 5 hours. The cron commands are received every 30 minutes, and are acknowledged by Civi on the status page. Have checked that php, joomla and civi are all set to London time zone. These are small test mailings of about six users. Any ideas?
  Thanks in anticipation.
  John
  
  **Tags:** joomla, cron, mailing
  
  > **Comments:**
  > **username_0**: I have learnt enough, I think, after 6 months to solve my problem. I inserted a single line in clip.php:  "date_default_timezone_set("Europe/London");" and now emails are sent straight away. This is probably obvious, but it took me so long to find a solution.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-03-02. Score: 3
  
  I would look at the `scheduled_date` on the mailings in your database:
  `SELECT name,scheduled_date FROM civicrm_mailing;`
  If the scheduled\_date is off, then it might be that MySQL has a time mismatch - or that specific users in Joomla have a different timezone setting than the default (not sure if this is possible in Joomla, but it can be done in WordPress/Drupal).
  
  If the `scheduled_date` is correct, then I'd check to see that your cron user is running in the same time zone. E.g. if cron is triggered by `root` and not the web server user, I'd expect this sort of issue to creep in.
  
  EDIT: You mention that you're running cron via the "cli.php" tool. That means that PHP is using a different `php.ini` file than when you do web-based PHP, and your timezone might be different. If you have terminal access, check your timezone with `php -i | grep zone`.
  
  Since you're using Siteground, I doubt they allow you to control the `php.ini` timezone. Since that's the case, I would recommend using the [HTTP Method](https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#http) of running cron, which will set the timezone based on the web-based timezone.
  
  > **Comments:**
  > **username_0**: Thanks for your answer. I looked at the scheduled date, and that was fine. SiteGround have confirmed that the server time is 5 hours behind. I don't understand how to investigate the second part of your answer. Could you explain further? Thanks.  
  > **username_1**: Do you know how your cron is set up?  If so, please give more detail and I can give you suggestions on investigating further.  
  > **username_0**: Cron runs from the from SiteGround cpanel: "php /home/site/public_html/administrator/components/com_civicrm/civicrm/bin/cli.php \-u user \-p pwd \-e Job \-a execute".  
  > **username_1**: @JohnA See my edit above.  
  > **username_0**: Thanks Ed. Have tried this. Used the command : https://<URL>/administrator/components/com_civicrm/civicrm/bin/cron.php?name=username&pass=pwd&key=key  but email says"https://<URL>/administrator/components/com_civicrm/civicrm/bin/cron.php?name=username" no such file or directory. I can't get the syntax quite right.  
  
  ---
  
  