Time not correct?

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
11/4/2010 10:45:54 AM
Gravatar
Total Posts 65

Time not correct?

Hi,

When using the file sharing module and uploading a file the modified time is set about 5 hours ago? I have checked the server and the systemtime there is correct. Also the Mojoportal SiteSettings > states the correct time zone (GTM +01:00)

How do I solve this?

BestRegards

12/6/2010 10:20:36 AM
Gravatar
Total Posts 18439

Re: Time not correct?

Time is localized to the user time zone for authenticated users or the site time zone for unauthenticated users. Make sure you have set the correct time zone on your user profile.

12/7/2010 3:21:04 AM
Gravatar
Total Posts 65

Re: Time not correct?

Thanks!

Our existing users have the timezone set to +5 hours? Do we have to manually change this on all the existing users? And Is there a default value we can set for new users?

BestRegards

12/7/2010 10:30:57 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Time not correct?

Hi Snowman, I believe the user time zone is defaulted from the site's time zone, which is located at the top of Administration, Site Settings. To mass update your users' time zones, you could use SQL like this (example only):

update mp_users set TimeZoneId = 'Pacific Standard Time' where TimeZoneId <> 'Pacific Standard Time' or TimeZoneId is NULL;

Jamie

 

12/8/2010 2:54:59 AM
Gravatar
Total Posts 65

Re: Time not correct?

Thanks!

The sites Time Zone is sit to (GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna. A new user will have the profile Time Zone set to (GMT-05:00) Eastern Time (US & Canada) ?

I do not se how I can solve this problem? Pleas advice.

BestRegards

12/8/2010 10:05:31 AM
Gravatar
Total Posts 18439

Re: Time not correct?

copy the mojoProfile.config file in the root an rename it to mycustomprofile.config, then change the default value in the TimeZoneId to your preferred time zone id

then add this to user.config

<add key="mojoProfileConfigFileName" value="mycustomprofile.config"/>

12/8/2010 10:06:55 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Time not correct?

Never mind, Joe beat me to it. Looks like I was incorrect, and the time zone default for users is coming from the config file, not the site settings.

12/8/2010 10:12:44 AM
Gravatar
Total Posts 18439

Re: Time not correct?

You are mostly correct Jamie. If the timezoneid is commented out of the profile configuration (so it isn't shown on the registration page) instead of configured to be shown on registration, then it would use the default from site settings, but if the control is shown it must have the default specified there in the config file. It was not very long ago that we added the setting to show on the registration page by default from the profile config file, prior to that it worked just as you described.

Best,

Joe

12/10/2010 2:41:14 AM
Gravatar
Total Posts 65

Re: Time not correct?

Hi,

I have now done the following :

  1. Copy mojoProfile.config to my local computer
  2. There was no TimeZoneId in mojoProfile.config but there was a TimeOffSetHours > defaultValue="-5.00", this was changed to "+1.00"
  3. Rename the mojoProfile.config to mycustomprofile.config
  4. Copy it to the root of MojoPortal site
  5. Opening user.config
  6. Insert <add key="mojoProfileConfigFileName" value="mycustomprofile.config"/> at the bottom
  7. Restart the site/IIS

Then I created a test user but the TimeZone is still set to -5.00 ?

What have I missed?

BestRegards

12/10/2010 8:54:33 AM
Gravatar
Total Posts 18439

Re: Time not correct?

If there is no timezoneid in the file you must be using an old version of mojoportal. I recommend upgrade to the latest version then update timezoneid setting like this:

<add name="TimeZoneId"
  type=""
        iSettingControlSrc="~/Controls/TimeZoneIdSetting.ascx"
  labelResourceKey="TimeOffsetLabel"
        defaultValue="W. Europe Standard Time"
  requiredForRegistration="true"
  regexValidationExpression=""
  regexValidationErrorResourceKey=""
  includeHelpLink="false"
  />

Hope it helps,

Joe

12/10/2010 9:07:45 AM
Gravatar
Total Posts 65

Re: Time not correct?

Thanks!

I found the TimeZoneId now. I have set it as you describe, transferred it to the server and restart the IIS. But when creating a new user I still get the GMT -05.00 ? The sites timezone is however still +1,00 as it should.

BestRegards

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