Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-7369

Custom Profile dates display incorrectly

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.0.8-RC1
    • Labels:
      None
    • Environment:
      PHP Environment: PHP version 5.2.5
      Database: MySQL version 4.1.22-standard-log

      Description

      I have children's birthdays and anniversaries setup as custom profile fields. They appear correctly in the ucp when setting up they also appear correctly inside the database, however when you post the fields are all one day behind and same when you view a users profile

        Activity

        Hide
        tearrek tearrek added a comment -

        Just to add to this , if i set my timezones both in ucp/acp to utc it works as supposed to but as soon as i change it to utc -6 dst(on/off) this is where it gets messed up, this is the only place where the date is wrong aswell posting date and everything else is bang on

        Show
        tearrek tearrek added a comment - Just to add to this , if i set my timezones both in ucp/acp to utc it works as supposed to but as soon as i change it to utc -6 dst(on/off) this is where it gets messed up, this is the only place where the date is wrong aswell posting date and everything else is bang on
        Hide
        ToonArmy Chris Smith added a comment -

        The problem is caused by

                            global $user;                    // d/m/y 00:00 GMT isn't necessarily on the same d/m/y in the user's timezone, so add the timezone seconds                    return $user->format_date(gmmktime(0, 0, 0, $month, $day, $year) + $user->timezone + $user->dst, $user->lang['DATE_FORMAT'], true); 

        Show
        ToonArmy Chris Smith added a comment - The problem is caused by                     global $user;                    // d/m/y 00:00 GMT isn't necessarily on the same d/m/y in the user's timezone, so add the timezone seconds                    return $user->format_date(gmmktime(0, 0, 0, $month, $day, $year) + $user->timezone + $user->dst, $user->lang['DATE_FORMAT'], true); 
        Hide
        ToonArmy Chris Smith added a comment -

        I think the solution is to use the current values for hours, minutes and seconds rather than zeros.

        Show
        ToonArmy Chris Smith added a comment - I think the solution is to use the current values for hours, minutes and seconds rather than zeros.
        Hide
        tearrek tearrek added a comment -

        Okay let's pretend that went over my head, okay let's not and just say it did hehe

        Your second post is this something I can do myself? If so where do I do this?

        Show
        tearrek tearrek added a comment - Okay let's pretend that went over my head, okay let's not and just say it did hehe Your second post is this something I can do myself? If so where do I do this?
        Hide
        ToonArmy Chris Smith added a comment -

        It was more of a comment towards the developers

        Show
        ToonArmy Chris Smith added a comment - It was more of a comment towards the developers

          People

          • Assignee:
            ToonArmy Chris Smith
            Reporter:
            tearrek tearrek
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development