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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.7 Release Testing »
  • [SOLVED] set time_zone throws error!
Pages: [1]

Author Topic: [SOLVED] set time_zone throws error!  (Read 420 times)

Tiggr

  • I post occasionally
  • **
  • Posts: 38
  • Karma: 1
    • Rodgauer Workshop
  • CiviCRM version: 4.7.beta3
  • CMS version: Drupal 7
[SOLVED] set time_zone throws error!
December 16, 2015, 01:58:46 pm
Hi!

After upgrading to beta3, I get following error:

Code: [Select]
Datenbank-Errorcode: Unknown or incorrect time zone: '00:00', 1298
Zusätzliche Details:
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => SET time_zone = '00:00' [nativecode=1298 ** Unknown or incorrect time zone: '00:00']
    [type] => DB_Error
    [user_info] => SET time_zone = '00:00' [nativecode=1298 ** Unknown or incorrect time zone: '00:00']
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="SET time_zone = '00:00' [nativecode=1298 ** Unknown or incorrect time zone: '00:00']"]
)

After changing >0 to >=0 inside civicrm/drupal/civicrm.module, it works again... :-)

Code: [Select]
function getUFTimeZone(){
 global $user;
 if (variable_get('configurable_timezones', 1) && $user->uid && strlen($user->timezone)) {
  $timezone = $user->timezone;
 } else {
  $timezone = variable_get('date_default_timezone', null);
 }
 if(empty($timezone)){
  return false;
 }
 $hour = $user->timezone / 3600;
 $timeZoneOffset = sprintf("%02d:%02d", $timezone / 3600, ($timezone/60)%60 );
 if($timeZoneOffset >= 0){
  $timeZoneOffset = '+' . $timeZoneOffset;
 }
 return $timeZoneOffset;
}

Bye
Tiggr
« Last Edit: December 16, 2015, 06:09:43 pm by Coleman Watts »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: set time_zone throws error!
December 16, 2015, 03:25:47 pm
We're scratching our heads a bit since the function your referencing doesn't seem to exist in either 4.7 (current master) nor in 4.6 codebases. Are you running a customized version of civicrm.module?
Protect your investment in CiviCRM by  becoming a Member!

Tiggr

  • I post occasionally
  • **
  • Posts: 38
  • Karma: 1
    • Rodgauer Workshop
  • CiviCRM version: 4.7.beta3
  • CMS version: Drupal 7
Re: set time_zone throws error!
December 16, 2015, 04:00:04 pm
Argh! Silly me!

I've downloaded CiviCRM for Drupal 6, but I'm using Drupal 7.x! :-(

I'm very sorry!

Bye
Tiggr

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.7 Release Testing »
  • [SOLVED] set time_zone throws error!

This forum was archived on 2017-11-26.