Answers.Body: <p>Use <code>ini_get('date.timezone')</code>.</p>
  
  <p>Source: <a href="http://php.net/manual/en/function.ini-get.php" rel="nofollow noreferrer">http://php.net/manual/en/function.ini-get.php</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-12T01:14:32.010Z
Answers.LastActivityDate: 2016-12-12T01:14:32.010Z
Answers.UserDisplayName: Jameal G
Body: <p>I'm setting up cron jobs from my plugin and I need to format the date in the server's time zone. It looks like Craft is overriding the timezone set in php.ini because PHP's <code>date_default_timezone_get()</code> always returns UTC. Is there another way to get the actual timezone set on the server?</p>
  
Tags: <plugin-development><datetime><timezone>
Title: How can I get the server's timezone in a Craft plugin?
ThreadText: # How can I get the server's timezone in a Craft plugin?
  
  (Asked by: username_0 on 2016-12-12)
  
  I'm setting up cron jobs from my plugin and I need to format the date in the server's time zone. It looks like Craft is overriding the timezone set in php.ini because PHP's `date_default_timezone_get()` always returns UTC. Is there another way to get the actual timezone set on the server?
  
  **Tags:** plugin-development, datetime, timezone
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-12-12. Score: 1 | Accepted answer
  
  Use `ini_get('date.timezone')`.
  
  Source: <http://php.net/manual/en/function.ini-get.php>
  
  
  ---
  
  