WebMail

Discussion in 'General' started by mphayesuk, Nov 14, 2005.

  1. mphayesuk

    mphayesuk Member HowtoForge Supporter

    When using the web mail the time and date that the mail arrives is displayed in the inbox.... but its never right.... the dates are way off and the time is always 00:00.... I followed the how to guide and set up the time server.....

    So anyone got any suggestions.

    Thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    if you execute the date command on the shell, does it displays the correct time?
     
    Last edited: Nov 15, 2005
  3. mphayesuk

    mphayesuk Member HowtoForge Supporter

    Yes the date and time are spot on.
     
  4. mphayesuk

    mphayesuk Member HowtoForge Supporter

    Has anyone any other ideas
     
  5. IntnsRed

    IntnsRed Member

    I'm stabbing at things here, so take these with a grain of salt.

    * Is the system's timezone set correctly? What does "cat /etc/timezone" say? IMHO, on Unix boxes, the system hardware clock time should be in UTC, and then translated for a particular user (no matter even if a distro lets you keep the hardware clock time in local timezones).

    * Webmail has a setting to let mail be converted to the user's local timezone; is that set?
    ________
    Pedro rodr?guez (racing driver)
     
    Last edited: Mar 4, 2011
  6. mphayesuk

    mphayesuk Member HowtoForge Supporter

    OK /etc/timezone did not work.

    If I do a date at the shell prompt I get the correct date and time

    If I do a time at the sheel prompt I get:

    real 0m0.000s
    user 0m0.000s
    sys 0m0.000s

    Under yast I have changed the hardware clock to be set to UTC, but still time does not change from above... I think this is the problem but I dont know how to fix it.

    Thanks
     
  7. mphayesuk

    mphayesuk Member HowtoForge Supporter

    Ok so ignore the statement in the previous post about the time command its not what I thought it was.... time will time an event or process... from reading on the internet anyway.... so does anyone know why the time on webmail is not beign displayed properly.

    Thanks
     
  8. AZMel

    AZMel New Member

    I'm having the same problem with the date and time. Anyone have a solution yet? If it is timezone related I am in the US/Arizona timezone.

    Thanks,

    Mel
     
    Last edited: Nov 18, 2005
  9. IntnsRed

    IntnsRed Member

    With Debian GNU/Linux we have a tzsetup and tzconfig command which sets the timezone up.

    I'm not sure how SuSE does it. Doing an "apropos timezone" and/or "apropos tz" may yield some useful information.
    ________
    Dodge razor specifications
     
    Last edited: Mar 4, 2011
  10. mphayesuk

    mphayesuk Member HowtoForge Supporter

    I tried reseting the timezone and both the local and utc are set to the same date and time... but the date and time on emails is still wrong... after I reset the timezone I tested it with another e-mail.

    Can anyone shed some light on this
     
  11. falko

    falko Super Moderator Howtoforge Staff

    And this happens only in webmail, not in an email client like Outlook Express or Thunderbird?
     
  12. mphayesuk

    mphayesuk Member HowtoForge Supporter

    Ok a bit of a break through, when I collect mail through outlook the time and date is right.... which is good news in a way.... so any ideas why its so wrong in the webmail system.

    Thanks
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you asked on the uebiMiau Website / Forums if they know the your problem?
     
  14. mphayesuk

    mphayesuk Member HowtoForge Supporter

    Ok where does webmail (uebimiau) get installed to I need to change one of the php files.
     
  15. mphayesuk

    mphayesuk Member HowtoForge Supporter

    Ok from what I understand you guys add in bits to uebimiau when you make it compatible with ispconfig..... so I am finding it hard to find the correct php file to edit... according to there forum I need to put this into a php file:

    --- shared.make_timestamp.php.orig 2005-08-02 11:37:39.000000000 -0300
    +++ shared.make_timestamp.php 2005-08-02 11:37:20.000000000 -0300
    @@ -7,9 +7,16 @@
    \*======================================================================*/
    function smarty_make_timestamp($string)
    {
    + /*
    + * On 64bit-platform(such as FreeBSD/amd64), strtotime(time()) does not
    + * return -1. So workaround here by testing the $string with is_numeric().
    + */
    if(empty($string)) {
    $string = "now";
    + } else if (is_numeric($string)) {
    + return (int)$string;
    }
    +
    $time = strtotime($string);
    if (is_numeric($time) && $time != -1)
    return $time;

    Can you two (till and falco) point me in the right direction.

    Thanks :D
     
  16. mphayesuk

    mphayesuk Member HowtoForge Supporter

    **** Solution *****

    Ok If you are using a 64bit system this is what you will need to do in order to make the time and date work on the we interface to Ubeimiau.

    Go to this file:

    home/admispconfig/ispconfig/web/webmail/smarty/smarty.addons.php

    and find the function smarty_make_timestamp($string)

    if(empty($string)) {
    $string = "now";
    }else if(is_numeric($string)) {
    return (int)$string;
    }
    $time = strtotime($string);
    if(is_numeric($time) && $time != -1
    return $time;

    You need to add in the code in red above into the function and that should make the webmail time and date look right.
     
  17. AZMel

    AZMel New Member

    This works on my 64 bit system. :D

    How do I Americanize the format into MM/DD/YY?

    Mel
     
  18. falko

    falko Super Moderator Howtoforge Staff

Share This Page