blak3r / yaai

SugarCRM Asterisk integration
http://www.sugarforge.org/projects/yaai
GNU General Public License v3.0
81 stars 85 forks source link

Wrong duration in calls #157

Closed ivahaev closed 10 years ago

ivahaev commented 10 years ago

Hello,

Yaai version 3.5.5 works perfectly but the duration of call writes wrong. skitch

How can I fix it?

Regards, ivahaev

blak3r commented 10 years ago

That's a good question... hmm... most likely timezone related. Is the date start and date end times correct?

P.S. - that theme looks pretty cool. What is that?

ivahaev commented 10 years ago

The theme is standart comes with SugarCRM 6.5.1. Where can I look date end?

Call screen: 2013-10-04 09 19 14

ivahaev commented 10 years ago

Hi blak3r,

Can you help me or not?

blak3r commented 10 years ago

Go to call detail view

Sent from my iPhone

On Oct 7, 2013, at 12:47 AM, ivahaev notifications@github.com wrote:

Hi blak3r,

Can you help me or not?

— Reply to this email directly or view it on GitHub.

ivahaev commented 10 years ago

Sorry, the last message contains detail view screenshot. Do you need another view?

blak3r commented 10 years ago

Sorry, i didn't see the screenshot. Umm... so The created time is 5:19pm The start time is 9:19pm.

So, it's a timezone issue.

I'm not sure why it's a negative number though... I'd think the end time would show as 9:43pm... Check the timezone you have set in php.ini... that's probably the issue.

ivahaev commented 10 years ago

Hmm. php.ini.. Ok I'll try. thank you

ivahaev commented 10 years ago

I've set timezone in php.ini. No effect! The settings in php.ini and settings are the same.

blak3r commented 10 years ago

Weird... I'd have to think really hard about what is happening. There is a thread on here about timezones. Maybe if you read that it'll give you some ideas.

Does your sugarcrm database user have admin credentials?

On Mon, Oct 7, 2013 at 1:35 PM, ivahaev notifications@github.com wrote:

I've set timezone in php.ini. No effect! The settings in php.ini and settings are the same.

— Reply to this email directly or view it on GitHubhttps://github.com/blak3r/yaai/issues/157#issuecomment-25828530 .

ivahaev commented 10 years ago

Let's think about it. Where from "start date&time", "created" and "changed" come? The timezone is UTC+4 (Europe/Moscow), and start time is +4 but from local time. The timezone was the first thing I looked. May be start time comes from asterisk? But asterisk has the same timezone. Brrr... One solution will be edit asteriskLogger.php near 719 line but it would be wrong and really stupid :)

Ok, I'm going to bed. Tomorrow is a new day.

Thanks for the help.

blak3r commented 10 years ago

it all comes from UNIX TIME mysql calls. I think sugar is setting the date modified and date created.

That thread explains why we did it that way. Had to do with differences in database time vs. sugar time.

On Mon, Oct 7, 2013 at 2:16 PM, ivahaev notifications@github.com wrote:

Let's think about it. Where from "start date&time", "created" and "changed" come? The timezone is UTC+4 (Europe/Moscow), and start time is +4 but from local time? The timezone was the first thing I looked. May be start time comes from asterisk? But asterisk has the same timezone. Brrr... One solution will be edit asteriskLogger.php near 719 line but it would be wrong and really stupid :)

Ok, I'm going to bed. Tomorrow is a new day.

Thanks for the help.

— Reply to this email directly or view it on GitHubhttps://github.com/blak3r/yaai/issues/157#issuecomment-25831787 .

blak3r commented 10 years ago

@ivahaev did you ever figure out what the problem is? Want to close this thread out if so.

blak3r commented 10 years ago

closing this thread, please reopen if you have anything else to mention.