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

12/10/2010 9:11:43 AM
Gravatar
Total Posts 18439

Re: Time not correct?

what version of mojoPortal? you need to upgrade

12/10/2010 9:12:02 AM
Gravatar
Total Posts 65

Re: Time not correct?

This is how the TimeZoneId section in mycustomprofile.config look like

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

I have also checked so my user.config has the following :

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

 

By the way, what does this mean :

name="TimeOffsetHours" > defaultValue="+1.00"

This was set to -5.00 before? Should I change it back?

BestRegards

12/10/2010 9:15:17 AM
Gravatar
Total Posts 65

Re: Time not correct?

Systeminformation
mojoPortal Version 2.3.4.7 MySQL
Operating System Microsoft Windows NT 6.0.6002 Service Pack 2
ASP.NET Version v4.0.30319 Running in Full Trust
Serverns tidszon: W. Europe Standard Time
Serverns lokala tid: (GMT 1) 2010-12-10 16:13:09
Tiden nu i Greenwich (sk. GMT eller UTC): 2010-12-10 15:13:09
Version av funktion Hjälp
Funktion Schemaversion
blog 0.0.1.7
contactform 0.0.0.4
eventcalendar 0.0.0.4
feed-manager 0.0.0.8
forums 0.0.1.5
imagegallery 0.0.0.6
linksmodule 0.0.0.6
pollfeature-byChristianFredh 0.0.0.4
sharedfiles 0.0.0.8
surveyfeature 0.0.1.6
webstore 0.0.6.8

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