We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Birthdays are showing 2 hour before | Forum

Topic location: Forum home » Support » General Questions
Alberto MC
Alberto MC Mar 15 '13

Hi all!

 

Birthdays are showing 2 hour before in newsfeed...I mean if tomorrow is the birthday of a member, today at 10:00 PM the message is displayed in newsfeed, insted of 12:00 AM. I set correctly TimeZone (America/Hermosillo) under main settings on my oxwall installation, maybe the problem is related with my shared web hosting and I have no access to the file php.ini...any idea how to fix this? I would like to increment in 2 hours the message displayed in newsfeed.

Purusothaman Ramanujam
I believe cron for this run based on a rough 24 hours calculation..
Alia Team
Alia Mar 17 '13
Pablo, when does your CRON runs? What is your server time?
Alberto MC
Alberto MC Mar 18 '13

Thanks for answer.

Cron runs every minute (I think so), I have this in my cpanel:

wget -q -O /dev/null http://mysite.com/ow_cron/run.php

Minute Hour Day Month dow

  1     *    *    *    *

My server time? I couldn't find it in my cpanel but with echo date('d-m-Y H:i:s'); I got 18-03-210 22:08 (7:08 PM my pc). For other pages I'm using setlocale to adjust the time. Can I edit the file .htaccess or create a php.ini with new time zone? My time zone is America/Hermosillo (mountain USA) and its set on TimeZone settings. Thanks in advance. 

 

Alia Team
Alia Mar 20 '13
Pablo, CRON for birthdays is set to run once in 24 hours. Usually it is in midnight.
CRON runs by server time.
Seems like your CRON runs at 1.am and therefore you see birthdays at 10pm.

If my assumption is right then changing the time when CRON runs to 3am. should work for you.
BUT, if you have users using your site from other countries, they won't see birthdays in a correct way, since they will be in a different timezone.

Currently we don't have the solution to this.

>> Can I edit the file .htaccess or create a php.ini with new time zone?

You can try. I am not sure whether this will work though.


Alberto MC
Alberto MC Mar 20 '13
Thaks Aliia for your support...only one more question
Quote from Aliia
Seems like your CRON runs at 1.am and therefore you see birthdays at 10pm.

If my assumption is right then changing the time when CRON runs to 3am. should work for you.

How I can do that?
Alberto MC
Alberto MC May 24 '13
Solved adding new time zone in .htaccess file.
Alia Team
Alia May 27 '13
Thanks for sharing Pablo.
Kevin Dommer
Kevin Dommer Aug 17 '14
Sorry for digging up an old topic but I am still having a problem with this.  The birthday event is triggered early resulting in it showing the birthday on the day before the actual birthday.


I have tried adding my timezone to all existing .htaccess files in my Oxwall installation and have also added all new .htaccess files in various folders to no avail.


Where can I change the cron settings for birthdays?  I can't seem to find it.

ross Team
ross Aug 18 '14
Kevin, this is how it currently works, it starts to the show the upcoming birthdays, the day before actual birthday, to change this behavior is considered as a custom code modification. 
Alberto MC
Alberto MC Aug 20 '14
Hi Kevin. In my case I added the line php_value date.timezone "America/Hermosillo"  in the .htaccess file located into the root folder, but when updated to Oxwall 1.7 this line it was not necessary anymore, so I did not added again.
Kevin Dommer
Kevin Dommer Aug 20 '14
Thanks for the extra info Alberto!  That was probably why it didn't work for me.  I didn't know about the php_value command so I was just using SetEnv TZ America/Chicago and it had no effect.


I will try the php_value command instead.  I haven't been able to upgrade to 1.7 yet because I keep getting errors after doing so and I haven't had time to try and figure out why.


Thanks again!