Results 1 to 7 of 7

Thread: Right date in calendar, wrong date in invite emails

  1. #1
    saaz is offline Junior Member
    Join Date
    Jan 2006
    Posts
    4

    Default Right date in calendar, wrong date in invite emails

    Operating system type and version: Linux infong 2.4 #1 SMP Wed Jan 18 14:53:29 CET 2006 i686 unknown
    Sugar Suite version: Version 4.2.0d
    Webserver type and version: Apache/1.3.33 (Unix)
    PHP version: 4.4.2
    MySQL server version: 4.0.24

    Hello,

    When I schedule a meeting, the invites that are sent as emails contain a wrong date. The meeting in the calendar is ok.

    Here is what it looks like:
    To: Sam,
    Hal has invited you to a Meeting
    Subject: Betalingsgateway
    Status: Planned
    Start Date: 27-11-2019 01:00 (GMT2)
    Duration: 1h, 30m
    Description: Opstartsmøde

    The date on the server looks fine when I use the "date" commandline command.

    I have searched in this forum but it doesn't look like anyone has experienced the same problem. There are only some issues with the time, not the date.

    Any help is appriciated
    Kind regards
    Sam

  2. #2
    divagater is offline Junior Member
    Join Date
    Jun 2006
    Posts
    3

    Default Re: Right date in calendar, wrong date in invite emails

    There are 3 bugs affecting meeting start dates in invite emails.

    1. Start date/time in invite is off by a lot and maybe even displays in the past:

    The solution posted by Jeremy in the bug works.

    Bug 6433: http://www.sugarcrm.com/crm/?option=...5-447710f3063d


    2. Star date/time in invite is off by 1 hour for some users:

    This issue is mentioned by rclazie in bug 6433 but its actually a different issue. If you set your date preference to anything other then 2006-12-23 the invite you receive will be off by 1 hour.


    3. Contacts (not users) included in a meeting get an invite with a blank start date.

    Bug 6273: http://www.sugarcrm.com/crm/?option=...5-44691ae6ea49

    irvingpop posted a patch on that bug. I also had patched this myself but took a different approach then irvingpop. I default the date and time prefs to the user sending the invite instead of the server defaults.

    Cheers,
    Billy

  3. #3
    saaz is offline Junior Member
    Join Date
    Jan 2006
    Posts
    4

    Default Re: Right date in calendar, wrong date in invite emails

    Hey Billy,

    Sorry for the late reply.

    After I changed the date format back to 2006-06-04 and changed the line in the Meeting.php file as descriped in Bug 6433 everything is back to normal.

    Thanks a lot for your reply and help.

    With kind regards
    sam

  4. #4
    dseaton is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    10

    Default Re: Right date in calendar, wrong date in invite emails

    When might this be fixed so that we can use other formats. My boss wants everybody to use the 12-23-2006 format.

  5. #5
    mpeychich is offline Member
    Join Date
    Dec 2005
    Posts
    5

    Default Re: Right date in calendar, wrong date in invite emails

    I have made a temporary fix for the 1 hour off setting in the invite emails. keep in mind it is only a hack, it will of course be overwritten next update... and hopefully with the legit working code. Anwhos... here it is:

    You should be running the 4.2.1a release. Once update go into sugar/modules/Meetings/Meeting.php. Find the following
    PHP Code:
    $xOffset $timedate->handle_offset($x$prefDate['date']." ".$prefDate['time'], true$current_user); 
    change it to this:
    PHP Code:
    $xOffset $timedate->handle_offset($x$prefDate['date']." ".$prefDate['time'], true$current_user1); 
    then find:
    PHP Code:
    $xtpl->assign("MEETING_STATUS",(isset($meeting->status)? $app_list_strings['meeting_status_dom'][$meeting->status]:"" ));
    $xtpl->assign("MEETING_STARTDATE"$xOffset." ".$prefDate['userGmt']); 
    and make it look like this:
    PHP Code:
    $xtpl->assign("MEETING_STATUS",(isset($meeting->status)? $app_list_strings['meeting_status_dom'][$meeting->status]:"" ));
            
    $userGmt $prefDate['userGmt'];
            
    $userGmt[strlen($userGmt)-2]=5;
            
    $prefDate['userGmt'] = $userGmt;
    $xtpl->assign("MEETING_STARTDATE"$xOffset." ".$prefDate['userGmt']); 
    the indented lines are the changes for this file.

    Then go into sugar/include/TimeDate.php

    find:
    PHP Code:
    function handle_offset($date$format$to true$user null) { 
    change to:
    PHP Code:
    function handle_offset($date$format$to true$user null$notify=0) { 
    find:
    PHP Code:
    $deltaServerUser $this->get_hour_offset($to$timezone); 
    change to:
    PHP Code:
    $deltaServerUser $this->get_hour_offset($to$timezone)+$notify
    this should allow you to use the non yyyy-mm-dd formats and still have accurate dates/times and time zone listings in the invites. By adding the $notify=null option in the above function you avoide messing up other sections of the site. If you make a call to that function and dont set that variable it will ignore the hack.

    Enjoy!

    -- Matthew Peychich

    P.S. $notify's value should be the number of hours you are off. we were getting (GMT -4) we are actually GMT-5 so we have it set to 1. and:
    $userGmt[strlen($userGmt)-2]=5;
    should be set to whatever time zone you are. ours is again, 5. i believe this will only show correctly on local time zone invites.

  6. #6
    mpeychich is offline Member
    Join Date
    Dec 2005
    Posts
    5

    Default Re: Right date in calendar, wrong date in invite emails

    In addition to the meetins/meeting.php, you should to the same meeting edits to calls/call.php

    and... i havent done it yet... but most likely the tasks/task.php as well

  7. #7
    Jimbo is offline Sugar Community Member
    Join Date
    Sep 2006
    Posts
    30

    Default Re: Right date in calendar, wrong date in invite emails

    Hi- I have 4.5b and also tried 4.5c WAMP. All my meetings have a Start Date: 12-31-1969 in the email notification even if I try your hack above.
    But, if the date preference for my user is yyy-mm-dd it comes out OK.

    Is there something different I need to do for 4.5b or c? for a "hotfix"

    Thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •