CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Timezone setting
Pages: [1]

Author Topic: Timezone setting  (Read 4485 times)

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Timezone setting
May 20, 2008, 04:30:36 pm
Event registration is set to expire, but it does not seem to work.  I was wondering if this could be a timezone issue.  does civicrm get timezone information from drupal or is it configured somewhere?  Is there a way that it could be incorrect for an event?  I see the location field of the address has a timezone, but not sure if that is used somehow in the calculation.

thanks,

S.

twowheeler

  • I post occasionally
  • **
  • Posts: 115
  • Karma: 11
    • Harrisburg Christian Performing Arts Center
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7.22
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Timezone setting
May 20, 2008, 05:27:48 pm
I am not following you.  How are events set to expire, exactly?  In the drupal event module, or civievents?

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Timezone setting
May 20, 2008, 05:32:19 pm
I have my drupal time zone set correctly - times are fine.  let's say it's 7pm EDT.  if i have a civievent with online registration ending at 7pm it should end registration.  however ... my server time is Central time so it thinks its 6pm and it does not end registration.  I'm wondering if i can explicitly set the civicrm timezone to something other than the server time (like drupal).  I also found this interseting discussion ...

http://forums.x10hosting.com/tutorials/59314-server-time-zone-local-time-zone.html

perhaps adding putenv("TZ=US/Eastern"); is an expensive work around ...

twowheeler

  • I post occasionally
  • **
  • Posts: 115
  • Karma: 11
    • Harrisburg Christian Performing Arts Center
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7.22
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Timezone setting
May 20, 2008, 05:57:47 pm
Drupal has had recurring problems with handling timezones.  Go to the drupal.org forums and search for "timezone" and you will find a great deal of angst.  This is being addressed with new versions of several modules, but in general those upgrades are not ready for prime time yet.  It sounds like the issues are worst when the server timezone is different than the site's timezone.  So maybe the fix offered in the post you mentioned would work, I don't know.

I have also seen people hacking the code to just ignore all timezone information -- ugly but effective.  Here is one that makes the drupal event module work:  http://drupal.org/node/247734
It is not relevant to your issue other than to show that it is not really a civicrm problem.



Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Timezone setting
May 20, 2008, 06:05:58 pm

Note that CiviCRM does not use the CMS (drupal, joomla or standalone) timezone. It uses the timezone from PHP which in most cases is the timezone where the server is based

there is already an issue filed to address this in a future release and have a timezone setting with CiviCRM.

http://issues.civicrm.org/jira/browse/CRM-2709

If important to you, consider submitting a patch to address this.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Timezone setting
May 20, 2008, 06:10:28 pm
I'll take a look and see if there is a workaround or patch, but that is a real limitation - you have to find a shared hosting provider in your own timezone ...

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Timezone setting
May 20, 2008, 09:59:23 pm

check: http://forum.civicrm.org/index.php/topic,303.msg3427.html#msg3427

for a potential workaround

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Timezone setting
May 21, 2008, 04:29:39 am
Tired method 1 for changing events - and it worked great!  did not try method 2.

Thanks!

koko

  • Guest
Re: Timezone setting
May 28, 2008, 07:21:28 am
Quote from: Donald Lobo on May 20, 2008, 09:59:23 pm

check: http://forum.civicrm.org/index.php/topic,303.msg3427.html#msg3427

for a potential workaround

lobo

Hi,

Thank you for the tip! It worked perfectly ;-)

ronald

  • I post occasionally
  • **
  • Posts: 48
  • Karma: 5
Re: Timezone setting
December 31, 2008, 08:39:54 am
Thanks lobo and sonicthoughts, both good ways to address the issue.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Timezone setting

This forum was archived on 2017-11-26.