Strange TimeZone registering using RPX

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
8/15/2010 2:45:17 PM
Gravatar
Total Posts 70

Strange TimeZone registering using RPX

Hi Joe,

I registered into a "test site" with RPX using a google account and an yahoo account. On both tests, the same behavior:

- Was never asked for TimeZone during registration (seems ok to me if default time zone was used)

- After registration, When listing profile from memberlist, it shows the following timeZone:  (GMT-04:00) Eastern Daylight Time

- When editing my new users profile, it shows: (GMT-05:00) Eastern Time (USA & Canada) for the same user !?!?!?

- My site settings timezone is (GMT-03:00) Brasilia

- If I manually edit the user timezone, it "syncs" again and shows the same info from both places

 

Additional info:

- I'm using postgres

- Last code from trunk

8/15/2010 3:58:37 PM
Gravatar
Total Posts 70

Re: Strange TimeZone registering using RPX

Joe, as a test, I changed SitUser.cs to make timeZoneId defaults to siteSettings.TimeZoneId when creating a SiteUser. 

Everything went smooth !!! Wondering if this "default" makes enough sense to make you change this on the source :) After all, this couldn't hurt since the actual default is hard coded : 

        private string timeZoneId = "Eastern Standard Time"; //default

My change was adding the following line to all the constructors, just below setting siteId : 

       timeZoneId = siteSettings.TimeZoneId;
 

8/15/2010 4:08:24 PM
Gravatar
Total Posts 70

Re: Strange TimeZone registering using RPX

I found out that IsDaylightSavingTime is  used only in ProfileView.aspx.cs. Maybe this explains why the timezone is showing different on ProfileView.aspx.cs and ManageUsers.aspx.cs:

                    TimeZoneInfo userTz = SiteUtils.GetTimeZone(siteUser.TimeZoneId);
                    if (userTz != null)
{
pnlTimeZone.Visible = true;

if (userTz.IsDaylightSavingTime(DateTime.UtcNow))
lblTimeZone.Text = userTz.DaylightNameWithOffset();
else
lblTimeZone.Text = userTz.DisplayName;
}

8/16/2010 8:00:38 AM
Gravatar
Total Posts 18439

Re: Strange TimeZone registering using RPX

I agree with the change to default to site settings time zone id for new users. Whether timezone is required at registration is determined by the mojoProfile.config file or a custom version of that file. I have also changed it to make it required by default. These changes are now in the repository, you should revert your changes and get the latest code.

We recently changed to a new timezone system from our previous system which was only an offset from GMT. The old system did not automatically adjust for Daylight Savings Time which varies by time zone, the new system does automatically adjust for daylight savings but it doesn't work in Mono, so we still support the old system under Mono. 

When we added this new system we had to account for existing users where the setting would be an empty string, in this case times are adjusted to the site default time zone until the user updates their profile which would set their timezone. So this was also happening with new users, it would be unspecified if it was not yet set by updating the profile. But going forward we will use the site default and/or the choice made by the user during registration if it is required for registration.

The profileview page shows the display name of the user's time zone correctly during Daylight Savings but it is different when using the dropdown list for editing purposes we don't adjust names for items in the list we just show the id name like "Eastern Standard Time" instead of Eastern Daylight Time, it is the same time zone and the official name and the id is "Eastern Standard Time", but during daylight savings we refer to it as Eastern Daylight Time.

Best,

Joe

8/16/2010 12:34:22 PM
Gravatar
Total Posts 70

Re: Strange TimeZone registering using RPX

Thanks again for being so fast JOE !!!

You must sign in to post in the forums. This thread is closed to new posts.