timezone momentary solution?

Hi,

This can be a momentary solution for timezone:

Open /inc/header.inc.php

after <? add this line:

date_default_timezone_set('Europe/Rome');

Change Europe/Rome with your timezone (you can find supported timzone here:

http://www.php.net/manual/en/timezones.php

I'm trying it and seems it work...

Let me know

Quote · 24 Dec 2009

Hello!

Seems need to add something similar for MySQL because for queries using function NOW() may have another values.

Regard

Quote · 25 Dec 2009

Does not work for me.

Also LeonidS is correct. It will have no effect on any mysql queries using any mysql built in time and date functions.



To actually get dolphin to work correctly in various time zones, a option for timezone would need to be added to admin, and every date function throughout all the code in dolphin would need to be changed to adjust based on that setting, and all mysql queries will need to be rewritten.

It's a lot of work to add that feature.



Funny things is, alot of software already has this, but dolphin does not.

https://www.deanbassett.com
Quote · 25 Dec 2009

Nop, that dont work at all...

This is one of thing that i most talk on the forum last two month... Simply the Boonex team dont hear... And i think that many user of Dolphin script is not in the same country where is the server located, so this is one of the major mistake for Dolphin script, especialy like the Deano says: " Funny things is, alot of software already has this, but dolphin does not. " I dont see any sence from Boonex regarding this. And i promise, i will never mention this problem again since i am borring my self whith this question and regarding IP Black List in the admin part... No point any more, Boonex hear only what they like and that's how fix the thing's... Sad...

Quote · 25 Dec 2009

Hello avantguardia!

BoonEx team hears very well (http://www.boonex.com/trac/dolphin/ticket/600, http://www.boonex.com/trac/dolphin/ticket/1624), we know that it is important thing but as we explained many times - feature will require rewrtitting every query with time/date content. So it's deal only for 7.1 not for 7.0.

Regard

Quote · 25 Dec 2009

Actually as i think about this, this should be a per user option where the user selects the time zone they are in. So dolphin just stores everything as normal using the default date of the server, and when dates and times are displayed, they are displayed in the user prefered time zone.

Doing it that way will allow each member of the site regardless of where they are located to see the time and dates in there own time zone. This i believe is how it should be done.

https://www.deanbassett.com
Quote · 25 Dec 2009

Actually as i think about this, this should be a per user option where the user selects the time zone they are in. So dolphin just stores everything as normal using the default date of the server, and when dates and times are displayed, they are displayed in the user prefered time zone.

Doing it that way will allow each member of the site regardless of where they are located to see the time and dates in there own time zone. This i believe is how it should be done.

Agre with you again...

Quote · 25 Dec 2009

Hello avantguardia!

BoonEx team hears very well (http://www.boonex.com/trac/dolphin/ticket/600, http://www.boonex.com/trac/dolphin/ticket/1624), we know that it is important thing but as we explained many times - feature will require rewrtitting every query with time/date content. So it's deal only for 7.1 not for 7.0.

Regard

I have to answer you LeonidS, no hard fillings please... Wink

BoonEx team hears very well....

http://www.boonex.com/trac/dolphin/ticket/600 --- ticket opened 8 month ago... priority: MAJOR???

http://www.boonex.com/trac/dolphin/ticket/1624 --- ticket opened 1 week ago???... milestone changed from Dolphin 7.0 (Hookie) RC 4 to 7.1.???

Sorry LeonidS, this is very stupid for me, i dont in the programming language that much, but i do know some thing. If 8 month take to fix as you can see MAJOR problem... i dont have a word... I will equip every member of my site with calculator to calculate when they received message +9 hours...

Sorry again...

Regards.

Quote · 25 Dec 2009

I don't mean to jump on boonex's side on this one, but i do understand why this one was pushed to 7.1.

The date function alone is used in 187 dolphin source files appearing 1136 times. And that is just the php calls. This does not include any sql queries.

So the time involved in changing this is very extensive.

https://www.deanbassett.com
Quote · 25 Dec 2009

for people that have dedicated server:

http://dev.mysql.com/doc/refman/5.1/en/time-zone-support.html

This correct mysql timezone, always need the above change in php file!

Quote · 25 Dec 2009

good news for all...

I'm trying some trick and this work for all (dedicated + hosting)!

1)open /inc/header.inc.php

after <? add:

date_default_timezone_set('Europe/Rome');

Change Europe/Rome with your timezone (you can find supported timzone here: http://www.php.net/manual/en/timezones.php )

2) Open /inc/classes/BxDolDb.php

locate (around line 86):

$this->res("SET sql_mode = ''");

below this row add:


$this->res("SET time_zone = '+1:00'");

Change +1:00 with your timezone...

Save and upload all....test and let me know!

I haven't tested all but seems It work...

This trick simple set timezone per connection, not per host, in this way u can change timezone without change server's time, in php and even in mysql!

Let me know!

Quote · 25 Dec 2009

Dude you are officially my hero.  That worked like a treat! Thank you.

Quote · 1 Jan 2010

It worked for me!!!!!

Thanks a lot. I've been trying to fix this with my host for days. Yet, I did it myself in minutes.

Quote · 23 Jan 2010

Well done Thank you it works.

Quote · 2 Feb 2010

Thanks a lot luca!! Works perfect!!!

Quote · 11 Feb 2010

 

good news for all...

 

I'm trying some trick and this work for all (dedicated + hosting)!

 

1)open /inc/header.inc.php

 

after <? add:

 

date_default_timezone_set('Europe/Rome');

 

Change Europe/Rome with your timezone (you can find supported timzone here: http://www.php.net/manual/en/timezones.php )

 

2) Open /inc/classes/BxDolDb.php

 

locate (around line 86):

 

$this->res("SET sql_mode = ''");

 

below this row add:


$this->res("SET time_z alt= '+1:00'");

 

Change +1:00 with your timezone...

 

Save and upload all....test and let me know!

 

I haven't tested all but seems It work...

 

This trick simple set timezone per connection, not per host, in this way u can change timezone without change server's time, in php and even in mysql!

 

Let me know!

Ok, I'm lost. My server was set to the proper time zone but Dolphin always added an hour. (23:05 always shows as 00:05) I added your fix and it added another 5 hours. By changing it to -6:00 I was able to make the site show the correct time.

My question is why? Why doesn't Dolphin just reflect the time setup in the server as the default time? Why is it screwed up?

PS, my correct time zone is America/Denver (or mountain time)

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 4 Apr 2010

No it doesnt work!!!

Error

Database query error

Fatal error: Call to a member function getParam() on a non-object in /home/***/***/inc/db.inc.php on line 83

good news for all...

I'm trying some trick and this work for all (dedicated + hosting)!

1)open /inc/header.inc.php

after <? add:

date_default_timezone_set('Europe/Rome');

Change Europe/Rome with your timezone (you can find supported timzone here: http://www.php.net/manual/en/timezones.php )

2) Open /inc/classes/BxDolDb.php

locate (around line 86):

$this->res("SET sql_mode = ''");

below this row add:


$this->res("SET time_z alt= '+1:00'");

Change +1:00 with your timezone...

Save and upload all....test and let me know!

I haven't tested all but seems It work...

This trick simple set timezone per connection, not per host, in this way u can change timezone without change server's time, in php and even in mysql!

Let me know!

Quote · 8 Apr 2010

No it doesnt work!!!

Error

Database query error

Fatal error: Call to a member function getParam() on a non-object in /home/***/***/inc/db.inc.php on line 83

good news for all...

I'm trying some trick and this work for all (dedicated + hosting)!

1)open /inc/header.inc.php

after <? add:

date_default_timezone_set('Europe/Rome');

Change Europe/Rome with your timezone (you can find supported timzone here: http://www.php.net/manual/en/timezones.php )

2) Open /inc/classes/BxDolDb.php

locate (around line 86):

$this->res("SET sql_mode = ''");

below this row add:


$this->res("SET time_z alt= '+1:00'");

Change +1:00 with your timezone...

Save and upload all....test and let me know!

I haven't tested all but seems It work...

This trick simple set timezone per connection, not per host, in this way u can change timezone without change server's time, in php and even in mysql!

Let me know!

It appeared to work, but I had a cron job report to say there was a non-object non-object in /inc/db.inc.php on line 83

I've since change my server time using WHM and also in mySql in select now(). Everything is correct... at least to MY timezone anyway. What's with Dolphin not originally opting for the user's timezone anyway? Yes, it'd be lots of work to correct all the instances now, but originally? Shame! Maybe in a future release.

Quote · 24 May 2010

Hi,

I am not a programmer, but surely if a member chooses their time zone on registration, with the default time zone being GMT, this can not be too difficult to write code for. All other major social networking software has this. By now you should be able to buy a module for this. So why doesn't someone design one for Boonex members?

I am in Australia so we are a day ahead of the USA.......frustrating!!!

Cheers

Quote · 23 Jun 2010

Because it can't be done with a module.

Adding timezone functions will require code rewrites to dolphin. Easy to do perhaps. But will require hours of work locating every location in dolphin where time is used to make changes. This of course will make upgrading dolphin a nightmare because the upgrade will destroy all of the code changes. So this is a feature that boonex themselves should do.

This i believe is a feature they have slated for version 7.1


https://www.deanbassett.com
Quote · 23 Jun 2010

good news for all...

I'm trying some trick and this work for all (dedicated + hosting)!

1)open /inc/header.inc.php

after <? add:

date_default_timezone_set('Europe/Rome');

Change Europe/Rome with your timezone (you can find supported timzone here: http://www.php.net/manual/en/timezones.php )

2) Open /inc/classes/BxDolDb.php

locate (around line 86):

$this->res("SET sql_mode = ''");

below this row add:


$this->res("SET time_z alt= '+1:00'");

Change +1:00 with your timezone...

Save and upload all....test and let me know!

I haven't tested all but seems It work...

This trick simple set timezone per connection, not per host, in this way u can change timezone without change server's time, in php and even in mysql!

Let me know!

THANKS ! ! ! !  WORK ! ! !

Quote · 30 Jun 2010

In addition to Luca's posts bove, you also need to change the timezone for the forums too, as this uses a different database connection.

For 7.0.2 do this...

edit

modules/boonex/forums/classes/Forum.php

Add to top of file...

date_default_timezone_set("Australia/Adelaide");

edit

modules/boonex/forums/classes/BxDB.php

find

mysql_query ("SET NAMES 'utf8'", $this->link);

add underneath

mysql_query ("SET time_z alt= '+9:30'", $this->link);


Now all posts made in forum will have correct timezone too.

/DM

Dolphin - Ajax Masturbation
Quote · 3 Aug 2010

Adding timezone functions will require code rewrites to dolphin. Easy to do perhaps. But will require hours of work locating every location in dolphin where time is used to make changes. This of course will make upgrading dolphin a nightmare because the upgrade will destroy all of the code changes. So this is a feature that boonex themselves should do.

This i believe is a feature they have slated for version 7.1

Deano - the fix given by Luca actually works as it changes the timezone for SQL - no need to change all instances of now() - jut set time_zone for SQL connection once - when making the database connection. Fortunately Boonex use persistent database connections so it remains set.

To expand on this - all that needs to be added is one admin field - to set the default timezone, and a user selection in profile for users to set their timezone.

On my site I have added timezone selection automatically based on the users state - a field I already had available.

So in summary - no need to wait for Dolphin 7.1 - it's a relatively easy thing to add in - just a few lines of code - I say promote it back to 7.0.3 !!!!

/DM

Dolphin - Ajax Masturbation
Quote · 3 Aug 2010

No it doesnt work!!!

Error

Database query error

Fatal error: Call to a member function getParam() on a non-object in /home/***/***/inc/db.inc.php on line 83

good news for all...

I'm trying some trick and this work for all (dedicated + hosting)!

1)open /inc/header.inc.php

after <? add:

date_default_timezone_set('Europe/Rome');

Change Europe/Rome with your timezone (you can find supported timzone here: http://www.php.net/manual/en/timezones.php )

2) Open /inc/classes/BxDolDb.php

locate (around line 86):

$this->res("SET sql_mode = ''");

below this row add:


$this->res("SET time_z alt= '+1:00'");

Change +1:00 with your timezone...

Save and upload all....test and let me know!

I haven't tested all but seems It work...

This trick simple set timezone per connection, not per host, in this way u can change timezone without change server's time, in php and even in mysql!

Let me know!

It appeared to work, but I had a cron job report to say there was a non-object non-object in /inc/db.inc.php on line 83

I've since change my server time using WHM and also in mySql in select now(). Everything is correct... at least to MY timezone anyway. What's with Dolphin not originally opting for the user's timezone anyway? Yes, it'd be lots of work to correct all the instances now, but originally? Shame! Maybe in a future release.

I also get error messages in /inc/db.inc.php  on line 83 how to solve this problem?

Quote · 5 Aug 2010

 

In addition to Luca's posts bove, you also need to change the timezone for the forums too, as this uses a different database connection.

For 7.0.2 do this...

edit

modules/boonex/forums/classes/Forum.php

Add to top of file...

date_default_timezone_set("Australia/Adelaide");

edit

modules/boonex/forums/classes/BxDB.php

find

mysql_query ("SET NAMES 'utf8'", $this->link);

add underneath

mysql_query ("SET time_z alt= '+9:30'", $this->link);


Now all posts made in forum will have correct timezone too.

/DM

 

 This not run for me :(

I need change the timedate for the Forum Pls

I need 7 Hours more :(

Could u Help me?

Quote · 29 Aug 2010

 

 

In addition to Luca's posts bove, you also need to change the timezone for the forums too, as this uses a different database connection.

For 7.0.2 do this...

edit

modules/boonex/forums/classes/Forum.php

Add to top of file...

date_default_timezone_set("Australia/Adelaide");

edit

modules/boonex/forums/classes/BxDB.php

find

mysql_query ("SET NAMES 'utf8'", $this->link);

add underneath

mysql_query ("SET time_z alt= '+9:30'", $this->link);


Now all posts made in forum will have correct timezone too.

/DM

 

This not run for me :(

I need change the timedate for the Forum Pls

I need 7 Hours more :(

Could u Help me?

you need to go to VPS

Quote · 29 Aug 2010

 

 

Actually as i think about this, this should be a per user option where the user selects the time zone they are in. So dolphin just stores everything as normal using the default date of the server, and when dates and times are displayed, they are displayed in the user prefered time zone.

Doing it that way will allow each member of the site regardless of where they are located to see the time and dates in there own time zone. This i believe is how it should be done.

 

Agre with you again...

agreed

Quote · 30 Aug 2010

this did not work for me hhmm

anyone else got anyother suggestions that may work

i get the database error like describbed above

Quote · 7 Oct 2010

I got the same problem:

Fatal error: Call to a member function getParam() on a non-object in /home/......./inc/db.inc.php on line 83

 

Quote · 26 Nov 2010

 

In addition to Luca's posts bove, you also need to change the timezone for the forums too, as this uses a different database connection.

For 7.0.2 do this...

edit

modules/boonex/forums/classes/Forum.php

Add to top of file...

date_default_timezone_set("Australia/Adelaide");

edit

modules/boonex/forums/classes/BxDB.php

find

mysql_query ("SET NAMES 'utf8'", $this->link);

add underneath

mysql_query ("SET time_z alt= '+9:30'", $this->link);


Now all posts made in forum will have correct timezone too.

/DM

 

 Thank's a lot!  In 7.0.5. all is displaying correctly now. The Orca forums however did not change a bit ?!  Any ideas?

Regards,  Jarmo

BR: Jarmo
Quote · 24 Feb 2011

In 7.0.5 on TDM Hosting this works fine!!!

 

VAI LUCA_IT!!!!!!!!!!!!!!!!

Quote · 27 Feb 2011

did somebody found any permanent solutionj for this including orca ? Im waiting for proper timezone setting in backend for a year and timezones tickets is always postponed from version to next version, I hope it gets fixed for real in 7.1 but as we have no info about 7.1 it can be done easily at end of a year as its massive update and I cant wait aniother year...

Quote · 27 Feb 2011

Here is my feedback on this trick!

I have two different dolphin community site, one based on 7.0.4 and one based on a fresh 7.0.5 version working on the SAME HOSTING PROVIDER better in the SAME SERVER (same s.o., same php configuration,same mysql)

So in 7.05. works like a charm (not tested yet forum), but on 7.0.4 message is DATABASE CONNECTION ERROR and nothing to do!


I finish this work, testing also forum connection, and give you guys my final feedback later

 

CUPIDO

 

Quote · 4 Mar 2011

UPDATE FINAL FEEDBACK!

After trying well on both versions, i can confirm that this trick about timezone is working properly on 7.0.4 and on 7.0.5 without problems.

By contrast, the connections to the forum does not work on both versions on the forum and the dates remain unchanged.

 

CUPIDO

Quote · 5 Mar 2011

Ciao Luca,

io ho Dolphin 7.0.6 e non riesco a trovare

$this->res("SET sql_mode = ''");

in

/inc/classes/BxDolDb.php

nei pressi della linea 86


Quote · 1 Apr 2011

 

 

In addition to Luca's posts bove, you also need to change the timezone for the forums too, as this uses a different database connection.

For 7.0.2 do this...

edit

modules/boonex/forums/classes/Forum.php

Add to top of file...

date_default_timezone_set("Australia/Adelaide");

edit

modules/boonex/forums/classes/BxDB.php

find

mysql_query ("SET NAMES 'utf8'", $this->link);

add underneath

mysql_query ("SET time_z alt= '+9:30'", $this->link);


Now all posts made in forum will have correct timezone too.

/DM

 

 WHy does not these changes do ANYTHING in my orca forums?  Timezone setting works just fine in the DOlphin but NOT in the orca forum. Orca has no effect att all dispite the settings....

Regards,  Jarmo

 

BR: Jarmo
Quote · 7 Apr 2011

For Dolphin 7.0.6

1) open /inc/header.inc.php

after <? add:

date_default_timezone_set('Europe/Rome');

Change Europe/Rome with your timezone (you can find supported timzone here: http://www.php.net/manual/en/timezones.php )

 

2) Open /inc/classes/BxDolDb.php

locate (around line 89):

mysql_query("SET sql_mode = ''", $this->link);

below this row add:

mysql_query("SET time_zone = '+2:00'", $this->link);

Quote · 2 Jun 2011

So sorry. in my 7.0.5. Orca does NOT want to show the correct time.... it just keeps living 10 hours earlier than my users..... Cry

BR: Jarmo
Quote · 25 Jul 2011

Got it at last! This is a working scenario for this problem:

http://www.boonex.com/trac/dolphin/wiki/GenFAQ

And DO NOT forget to recompile languages after the change. It won't work otherwise.... Foot in mouth

BR: Jarmo
Quote · 1 Aug 2011
i did everything as it is said in the document, but the time is not presented correctly. I the last forum posts at homepage is +2hours and inside the forum is -1hour. For php I choose Europe/Athens and at sql stuff i choose +2, as athens time is gmt+2 My server is arvixe. I find it strange. What did i do wrong? check it at my site if you want http://www.getpaid.gr Thank you!
Quote · 4 Oct 2011
i did everything as it is said in the document, but the time is not presented correctly. I the last forum posts at homepage is +2hours and inside the forum is -1hour. For php I choose Europe/Athens and at sql stuff i choose +2, as athens time is gmt+2 My server is arvixe. I find it strange. What did i do wrong? check it at my site if you want http://www.getpaid.gr Thank you!
Quote · 4 Oct 2011
i did everything as it is said in the document, but the time is not presented correctly. I the last forum posts at homepage is +2hours and inside the forum is -1hour. For php I choose Europe/Athens and at sql stuff i choose +2, as athens time is gmt+2 My server is arvixe. I find it strange. What did i do wrong? check it at my site if you want http://www.getpaid.gr Thank you!
Quote · 4 Oct 2011

http://www.thegeekstuff.com/2010/09/change-timezone-in-linux/

 

 

How To: 2 Methods To Change TimeZone in Linux

 

Method 1: Change TimeZone Using /etc/localtime File

For this example, assume that your current timezone is UTC as shown below. You would like to change this to Pacific Time.

# date
Mon Sep 17 22:59:24 UTC 2010

On some distributions (for example, CentOS), the timezone is controlled by /etc/localtime file.

Delete the current localtime file under /etc/ directory

# cd /etc
# rm localtime

All US timezones are located under under the /usr/share/zoneinfo/US directory as shown below.

# ls /usr/share/zoneinfo/US/
Alaska          Arizona         Eastern         Hawaii          Michigan        Pacific
Aleutian        Central         East-Indiana    Indiana-Starke  Mountain        Samoa

Note: For other country timezones, browse the /usr/share/zoneinfo directory

 

Link the Pacific file from the above US directory to the /etc/localtime directory as shown below.

# cd /etc
# ln -s /usr/share/zoneinfo/US/Pacific localtime

Now the timezone on your Linux system is changed to US Pacific time as shown below.

# date
Mon Sep 17 23:10:14 PDT 2010

Method 2: Change TimeZone Using /etc/timezone File

On some distributions (for example, Ubuntu), the timezone is controlled by /etc/timezone file.

For example, your current timezone might be US Eastern time (New York) as shown below.

# cat /etc/timezone
America/New_York

To change this to US Pacific time (Los Angeles), modify the /etc/timezone file as shown below.

# vim /etc/timezone
America/Los_Angeles

Also, set the timezone from the command line using the TZ variable.

# export TZ=America/Los_Angeles
"Your future is created by what you do today, not tomorrow." @ www.dexpertz.net
Quote · 6 Jan 2013

Is there any update on this issue?

Quote · 12 Dec 2013

I am testing a modification to allow members to select their time zone in the profile editor and when they signup. It needs extensive testing to determine where and if there are areas in dolphin where it does not work.

So feel free to test it on my site. http://www.deanbassett.com

https://www.deanbassett.com
Quote · 13 Dec 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.