Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Sent E-Mail Shows Up As 1969-12-31 14:00

  1. #1
    mhoppes is offline Sugar Community Member
    Join Date
    May 2007
    Posts
    45

    Default Sent E-Mail Shows Up As 1969-12-31 14:00

    I have installed Sugar and things seem to be working fine. However, one tiny issue. When I send an e-mail out it shows in the 'History' section of an account with a date and time of 1969-12-31 14:00. However, if I click it then the date and time show correctly on the next screen.

    Any ideas?

  2. #2
    franklin_sugar is offline Sugar Team Member
    Join Date
    Jun 2006
    Posts
    157

    Default Re: Sent E-Mail Shows Up As 1969-12-31 14:00

    Hi,

    This is Franklin from Sugar QA team. I tried your scenario and couldn't reproduce it. Can you tell me your environment, Sugar version and detailed steps to reproduce it?

    FYI, I used Sugar Open Source 4.5.1d build 1273, Windows XP, Apache 2.2.4, PHP 5.2.1, and MySQL 5.0.37.

    Thanks,
    Franklin

  3. #3
    mhoppes is offline Sugar Community Member
    Join Date
    May 2007
    Posts
    45

    Default Re: Sent E-Mail Shows Up As 1969-12-31 14:00

    Quote Originally Posted by franklin_sugar
    Hi,

    This is Franklin from Sugar QA team. I tried your scenario and couldn't reproduce it. Can you tell me your environment, Sugar version and detailed steps to reproduce it?

    FYI, I used Sugar Open Source 4.5.1d build 1273, Windows XP, Apache 2.2.4, PHP 5.2.1, and MySQL 5.0.37.

    Thanks,
    Franklin
    Franklin,
    Thanks for your response. The MySQL version of Sugar seems to display the correct date. To reproduce my problem try the following:

    Sugar Open Source 4.5.1d build 1273, Windows 2003 Server (though XP shouldn't affect it), Apache 2.2.4, PHP 5.2.1, MSSQL. The only thing I see different between your installation that worked, mine that worked, and mine that didn't work is the MSSQL vs. MySQL code.

  4. #4
    mhoppes is offline Sugar Community Member
    Join Date
    May 2007
    Posts
    45

    Default Re: Sent E-Mail Shows Up As 1969-12-31 14:00

    Just wanted to follow up. To duplicate this.. just send an e-mail from SugarCRM. Make sure you archive it. Then, go back and view it in history... in the history tab under the account you'll see it listed as 1969. If you click on it, the date shows correctly.

  5. #5
    franklin_sugar is offline Sugar Team Member
    Join Date
    Jun 2006
    Posts
    157

    Default Re: Sent E-Mail Shows Up As 1969-12-31 14:00

    I can reproduce it under MSSQL. A bug report is opened for it: bug #13347. Thanks for catching this bug.

    Thanks,
    Franklin

  6. #6
    mrobertson is offline Sugar Community Member
    Join Date
    Jun 2006
    Posts
    42

    Default Re: Sent E-Mail Shows Up As 1969-12-31 14:00

    The problem is the following section in email.php
    PHP Code:
            /*/////////////////////////////////////////////////////////////////////
            //// cn: bug 9193 - displaying "date_modified" in Subpanels makes it look
             * like we're overwriting the date/time values on replies.
             * This code is called from SubPanelTiles - we are overloading the date_modified field with the values below.
             */
            
    $q "SELECT date_start, time_start FROM emails WHERE id = '{$this->id}' AND deleted = 0";
            
    $r $this->db->query($q);
            
    $a $this->db->fetchByAssoc($r);

            
    $dateStart $a['date_start']." ".$a['time_start'];

            
    $dateStartHack $timedate->to_display_date_time($dateStart);
            
    $this->date_modified $dateStartHack
    Last edited by mrobertson; 2007-06-26 at 02:24 AM.

  7. #7
    mhoppes is offline Sugar Community Member
    Join Date
    May 2007
    Posts
    45

    Default Re: Sent E-Mail Shows Up As 1969-12-31 14:00

    Cool! Now, do you know what is wrong with it? I can take some guesses, but if someone knows before I go meddling, that would be better.

    Quote Originally Posted by mrobertson
    The problem is the following section in email.php
    PHP Code:
            /*/////////////////////////////////////////////////////////////////////
            //// cn: bug 9193 - displaying "date_modified" in Subpanels makes it look
             * like we're overwriting the date/time values on replies.
             * This code is called from SubPanelTiles - we are overloading the date_modified field with the values below.
             */
            
    $q "SELECT date_start, time_start FROM emails WHERE id = '{$this->id}' AND deleted = 0";
            
    $r $this->db->query($q);
            
    $a $this->db->fetchByAssoc($r);

            
    $dateStart $a['date_start']." ".$a['time_start'];

            
    $dateStartHack $timedate->to_display_date_time($dateStart);
            
    $this->date_modified $dateStartHack

  8. #8
    mhoppes is offline Sugar Community Member
    Join Date
    May 2007
    Posts
    45

    Default Re: Sent E-Mail Shows Up As 1969-12-31 14:00

    I see in the bug 13347
    it says 'Fixed In Release: 4.5.1.patch'
    However, the only thing I see is: Sugar Open Source for Microsoft SQL Server Patch 4.5.1d (1.14 MB ZIP)

    Is that what I want to download to fix this issue?

  9. #9
    Join Date
    Feb 2007
    Location
    San Jose, CA
    Posts
    1,169

    Default Re: Sent E-Mail Shows Up As 1969-12-31 14:00

    Hi there,

    I'm betting that it's fixed in 4.5.1.e, which is coming out in a couple of weeks. It wouldn't be fixed in 4.5.1.d since that was released before your issue was found and reported.

    Watch our Announcements section of the Forums for the announcement that 4.5.1.e is out.
    Susie Williams

  10. #10
    Deuce is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    California
    Posts
    66

    Default Re: Sent E-Mail Shows Up As 1969-12-31 14:00

    Quote Originally Posted by mhoppes
    Cool! Now, do you know what is wrong with it? I can take some guesses, but if someone knows before I go meddling, that would be better.
    I was fighting the same issue a while back... Replace the the line that reads
    $q = "SELECT date_start, time_start FROM emails WHERE id = '{$this->id}' AND deleted = 0";
    with
    $q = "SELECT convert(varchar, date_start, 101) as date_start, convert(varchar, time_start, 108) as time_start FROM emails WHERE id = '{$this->id}' AND deleted = 0";

    The issue here is that MS SQL does not have separate date and time data types, it is all datetime. The convert(xx,xx,101) plucks out just the date part, and the 108 grabs just the time part of the date.
    Last edited by Deuce; 2007-06-26 at 05:08 PM.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. UPGRADE 4.5.0h to 4.5.1: UpgradeWizard - ERROR: no file uploaded!
    By creaware in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2007-02-13, 12:24 AM
  2. Mail Campaigns and Contact Organization
    By bingomanatee in forum General Discussion
    Replies: 0
    Last Post: 2006-12-13, 05:44 PM
  3. Incomming mail problem
    By beeboob in forum Help
    Replies: 3
    Last Post: 2006-02-28, 01:42 PM

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
  •