Skip to Content Skip to Menu

Wrong time in cb_plug_pms_uddeim / pms.uddeim.php

13 years 9 months ago - 13 years 9 months ago #152063 by fabricebaro
When I send a PM from the user profile tab (using cb_plug_pms_uddeim / pms.uddeim.php) the time of the message is wrong.
However if I send a message using the uddeIM component the time is correct.

The time of messages is 10 hours behind the actual time.
My time zone in Joomla is UTC -5.
The cb_plug_pms_uddeim seems to ignore this setting: if I set the time zone to UTC 0 the message time stays the same.

I traced the generation of the time of messages to this function in pms.uddeim.php
Code:
function _pmsUddeGetTime($timezone = 0) { $rightnow=time()+(($this->mosConfig_offset+$timezone)*3600); return $rightnow; }
Earlier in the file we have
Code:
$this->mosConfig_offset = uddeIMgetOffset();
which calls
Code:
$config->getValue('config.offset');
in uddeimlib15.php (I assumed this since I run Joomla 1.5).

Anyways, I tried modifying _pmsUddeGetTime without success. I don't have any more time to look into this so I post here in hope someone smarter will figure what's wrong.
Last edit: 13 years 9 months ago by fabricebaro. Reason: typo

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
13 years 9 months ago - 13 years 9 months ago #152064 by slabbi
Yes I forgot to update the plugin.

The way uddeIM 2.2 displays the time is:

Example ($themessage contains the database row):
echo uddeDate($themessage->datum, $config, uddeIMgetUserTZ());

So there is no need to store a modified value. The time should be correct when you enter a "0" in the timezone field in uddeIM backend.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer
Last edit: 13 years 9 months ago by slabbi.
The following user(s) said Thank You: heyai

Please Log in or Create an account to join the conversation.

Moderators: beatnantslabbikrileon
Powered by Kunena Forum