Jump to content

Timezone Issue


mok

Recommended Posts

Hi, I am getting the following error when trying to adjust the timezone:

 

An error occurred while accessing the database

Due to a problem with the database Revive Adserver couldn't retrieve or store data. If this problem is reproducable it might be caused by a bug in Revive Adserver. Please report the following information to the creators of Revive Adserver. Also try to describe the actions that led to this error as clearly as possible.

Version: Revive Adserver v3.0.2
PHP/DB: PHP 5.2.17 / MySQL 5.1.72-cll
Page: /adserver/www/admin/account-preferences-timezone.php
Error: Duplicate entry '1-0' for key 'PRIMARY'
Query:

INSERT INTO phpads_account_preference_assoc (account_id , value ) VALUES ( 1 , 'America/New_York' ) 
$POST: 
Array
(
[submitok] => true
[timezone] => America/New
York
[token] => dbda2209336dceb1d16634ce5c4eef38
[submitsettings] => Save Changes
)
$_GET:

Empty

Link to comment
Share on other sites

  • 3 weeks later...

Try this:

SELECT * FROM phpads_account_preference_assoc WHERE account_id = 1 AND preference_id = 0;

It appears that there is already something in the database using those account ID and preference ID values. If you take note of the value (so that you can restore it again, should you need to do so), and then delete that row, perhaps you will then be able to correctly set the timezone via the UI.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

@andrewatfornax Below are the instructions I received which ended up working for us:

 

--

 

OpenX / Revive is designed to work on a server that is set to run internally in UTC (which is the standard for any server actually). The times displayed for the end user are an offset for their location, so a few hours before (like CET = GMT+1 or EST = GMT=5).

 

In the database of your system, there is a table named Preferences (or ox_preferences most likely). This has a record for each of the preferences a user can set or adjust. One of these is for the Timezone setting, and it should like similar to this: http://cl.ly/image/1E0L2G2h0p1L

 

It is not always the same preference_id value everywhere, so make a note of the value you have in your case.

 

Next, go to the table names ox_account_preference_assoc and search for any records with the preference ID you found. In one of my installations, this is what I found: http://cl.ly/image/1r2X1a3R1q41

 

This means that both my system as a whole (account_id=1) and my agency (account_id=2) are set to display date/time information for timezone Europe/Amsterdam.

 

You can have a look in the ox_accounts table to find out what the accounts are. If a user who has access to the system does not specify their own time zone preference, they automatically get times displayed with the time zone setting for the account they work in.

 

If the record named "timezone" is missing in the preference table, time zone settings won't work, and the activation and deactivation of campaigns (among other things) will work in UTC instead of what you assumed.

 

--

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...