Blog Module - Items not listing

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.
1/23/2007 10:45:11 PM
Gravatar
Total Posts 23
Brian

Blog Module - Items not listing

In Version mojoportal-2-2-1-2-mssqlreleasefiles when I add a new post to the Blob module, my new post doesn't display in the list. But, the post will be listed under the Month created. The problem appears to be that the "StartDate" in the Blogs Table is set in the future, when it actually should be set in the past.

For example I created a new post and the "StartDate" was 1/24/2007 4:27:30 AM and the "CreatedDate" was 1/23/2007 9:27:40 PM.

In my Web.config I have <add key="GreenwichMeantimeOffset" value="-5.00" />
In my mojoProfile.config I have defaultValue="-5.00" set in the <add name="TimeOffsetHours".

I tested this on the demo site and I get the same results.

1/24/2007 10:18:31 AM
Gravatar
Total Posts 18439

Re: Blog Module - Items not listing

Hi Brian,

The DateCreated field is populated with the server local time using GetDate() in SQL, it is not used in filtering posts.

The StartDate is adjusted to utc (aka GreenwichMeantime) (assuming the user has the correct timezone offset)

So if I'm in Eastern time which is GMT -5 hours, then when the post is made the starttime is adjusted by adding -userTimeZoneOffset hours to make it correct for utc/GMT and posts are displayed if the startdate is greater or equal than UTCNow which is passed into the db query.

In the display, the startdate is adjusted back from utc to the user's local time if the user is logged in or the server local time by using the GreenwichMeantimeOffset from web.config

So the only way that the post would not display is if the user's timezone offset setting is incorrect. If I'm in Easter Time zone which is -5 hours but my profile has -6(Central Time) then the wrong offset is used to determine utc and the post would not be displayed for 1 hour (assuming I did not change the default starttime which is utcnow adjusted to the user's timezone

It doesn't seem like a bug to me, it works correctly for my testing and there is no way I can know if the user time zone setting is incorrect.

Joe
1/24/2007 9:12:48 PM
Gravatar
Total Posts 23
Brian

Re: Blog Module - Items not listing

Joe...

Here's my detailed information:

  1. I live in Ohio (GMT-5 on Standard Time GMT-4 on Day Light Savings Time)
  2. My Webserver is located in Phoenix, Arizona (GMT-7)
  3. In Web.config <add key="GreenwichMeantimeOffset" value="-5.00" />
  4. My User Profile is configured with (GMT-5).

Ok... Here's a record from my Blogs Table for a test post I just created that did not display.

ItemID= 49
ModuleID= 14
CreatedbyUser = user@somedomain.com
CreatedDate = 2007-01-24 19:24:26.940
Title = Test3
Excerpt = Test3
StartDate = 2007-01-25 02:24:12.000
IsInNewsletter = 1
Description = Test3
CommentCount = 0
TrackBackCount = 0
Categories = NULL
IncludeInFeed = 1

So... If you use MS Excel or OO Calc to perform the following calculation:

StartDate - CreatedDate = 7 hours. This time difference decreases depending on how long in takes you to create a new post.

Its seams a little to coincidental that the difference is the number of hours Arizona is behind the GMT.

I hope this helps... If you need any additional information, please let me know as I'm always willing to help.

Keep up the great work...

Brian

1/24/2007 9:26:54 PM
Gravatar
Total Posts 18439

Re: Blog Module - Items not listing

Hi Brian,

You need to put -7.00 in the Web.config GreenwichMeantimeOffeset setting since that is the local server time zone.
Let me know if the problem persists after that.

I hadn't really thought about daylight saving time but I am in the Eastern time zone (GMT -5.00) and its working correctly for me, but my server is in the same timezone. Is Ohio in Daylight savings time now? Is Arizona?, Is Eastern time (Charlotte, NC) in Daylight savings? I'm thinking we are this time of year but I don't know if we have a different GMT offset because of that in Charlotte. Maybe you need -4.00 in your profile.

Hopefully the above will solve it, let me know if not.

Thanks,

Joe
1/24/2007 10:40:22 PM
Gravatar
Total Posts 23
Brian

Re: Blog Module - Items not listing

Hi Joe...

I made the change to the Web.config, but I'm still getting the same result.

Here's the website I used to locate the GMT Infomation... http://wwp.greenwichmeantime.com/time-zone/usa/time-zones.htm

Also... remember DST Changes this year.....
http://wwp.daylight-saving-time.com/usa/dst-2007.htm

Brian

1/25/2007 7:47:16 AM
Gravatar
Total Posts 18439

Re: Blog Module - Items not listing

Hi Brian,

Did you set your profile to -5.00? I'd say that what you need this time of year since it appears that we are in Standard time until March, then you would need to change your profile to -4.00.

When you make a new blog post the datepicker for Start Date should display the correct current time in your timezone based on your profile. Does that happen when you set your profile to -5.00?

Joe
1/25/2007 6:53:05 PM
Gravatar
Total Posts 18439

Re: Blog Module - Items not listing

I just realized that maybe we need a PreferredTimeZoneOffset setting in addition to the GreenwichMeantimeOffset which is supposed to be set to the server's local offset.

When a user is logged in they are seeing the utctime correctly adjusted to their local time but currently, users who are not logged in are seeing the time adjusted to the server local time which may not always be what is wanted. Like in your situation the server is at -7.00 but that may not be want you want to be the default timezone displayed to unauthenticated users. If most of your visitors are in your local time time zone it might be better to adjust to that for unauthenticated users.

I will look into this tomorrow.

Joe
1/25/2007 7:48:08 PM
Gravatar
Total Posts 23
Brian

Re: Blog Module - Items not listing

Joe...

I currently do have my profile set at the -5.00. And you are correct, when I add a new post the Start Date is adjusted to my current time zone displaying the correct time.

I appreciate your time and effort working on this issue.

Thanks...

Brian

1/26/2007 10:09:37 PM
Gravatar
Total Posts 23
Brian

Re: Blog Module - Items not listing

Joe...

Are you still looking at using a PreferredTimeZoneOffset to solve this timezone issue?

Also... have you put any additional thoughts about automatic adjusting for daylight savings?

Brian...

1/27/2007 9:04:07 AM
Gravatar
Total Posts 18439

Re: Blog Module - Items not listing

Hi Brian,

I implemented the PreferredTimezoneOffset in svn and just put out some new 2-2-1-3 files.

Automatic handling of Daylight Savings is a little tricker to implement, I'll ponder that one for a while and do a little research when I can.

As you pointed out, they are changing when Daylight Savings starts and stops, which makes me wonder whether
DateTime.Now.IsDaylightSavingTime will be reliable. It probably will on fully patched machines is my guess but need to confirm it.

Joe
1/30/2007 3:44:04 PM
Gravatar
Total Posts 18439

Re: Blog Module - Items not listing

Got an interesting email today relevant to this topic. had a feeling there was a significant impact to systems because of this change to Daylight Savings. There could be some wierd interactions if systems that communicate and share data with each other over the network are not all patched and are out of sync, especially for mission critical transaction systems.

Joe

Dear Valued Microsoft Customer,

This year Daylight Saving Time (DST) extends by approximately four weeks. In compliance with this provision in the Energy Policy Act of 2005, DST dates in the United States and Canada will start three weeks earlier (2:00 A.M. on the second Sunday in March) and will end one week later (2:00 A.M. on the first Sunday in November).

In some instances, effort will be required to accommodate the new DST legislation. For example, systems and applications may need to be updated directly, while in other circumstances the application may inherit the date and time information from the underlying system.

Microsoft is committed to helping customers that are affected by the DST changes make this transition as seamless as possible. Microsoft is producing updates for Windows products as well as other Microsoft products affected by the new U.S. statute. These updates will be released through technical support channels including Microsoft Customer Service & Support (CSS), as well as online channels such as Windows Update and Microsoft Update.

Details of the updates for Microsoft Windows and affected Microsoft applications, how customers can acquire them and when they will be available can be found on the Microsoft website at http://www.microsoft.com/dst2007. Corresponding technical Knowledge Base articles are linked from this website as well.

Microsoft is providing the Time Zone updates at no-cost for customers on Windows platforms that are covered by Mainstream Support. For more information on the Microsoft Support Lifecycle Policy including options available for products in Extended Support, please visit http://support.microsoft.com/lifecycle.

Further Assistance

Microsoft values your business. For more information visit http://www.microsoft.com/dst2007, or contact Microsoft for assistance. A list of phone numbers is located at http://support.microsoft.com. Microsoft Premier Customers may engage their Technical Account Manager directly.
2/26/2007 9:24:30 PM
Gravatar
Total Posts 23
Brian

Re: Blog Module - Items not listing

Hi Joe...

I upgraded to Version mojoportal-2-2-1-6-1-mssqlreleasefiles and I still getting the time around 7 hour difference in StateDate and CreatedDate.

I've have the following settings in my web.config

<!-- this should be the actual offset of server local time from GMT -->
<add key="GreenwichMeantimeOffset" value="-7.00" />
<!-- this should be the preferred timezone offset to display for unauthenticated users -->
<add key="PreferredGreenwichMeantimeOffset" value="-5.00" />

I also have my profile set at the -5.00.

I changed the GreenwichMeantimeOffset to a +7.00 to see if the change would make a difference.... with no result.

I changed the PreferredGreenwichMeantimeOffset to a +7.00 to see if the change would make a difference.... with no result.

I change my profile to -7.00 and +7.00 with no result.

The StartDate in the Datebase was not affected by any of the changes that I made... the StartDate was still around a 7 hours ahead of the CreatedDate....

Joe... I willing to work in detail with you to resolve this issue....

Please let me know....

Brian

2/27/2007 9:21:11 AM
Gravatar
Total Posts 18439

Re: Blog Module - Items not listing

Do you know what timezone your server is in and does it have its clock set accurately?

I've had occasions where my blog post didn't appear right away but most of the time it works correct for me. I think that some of the times when it happened to me may have been because the clock on the server is off a little.

I'm happy to work on trying to resolve this if I can get a repeatable process to produce the error but since the issue is related to particular machine environments its difficult for me to figure out exactly what scenario causes it or how it can be fixed.

Joe
2/27/2007 6:56:55 PM
Gravatar
Total Posts 23
Brian

Re: Blog Module - Items not listing

Joe....

I believe I finally hit the nail on the head.... you may need to read this a couple times....

OK.... here we go....

In previous versions of mojoportal...

If I added a
new post at 10/17/2006 7:09:16 PM,
the StartDate was 2006-10-17 15:09:16.000
and the CreatedDate was 2006-10-17 15:15:28.027.

But in the current version...

If I add a
new post at 2/27/2007 6:48:39 PM,
the StartDate is 2007-02-27 23:48:26.000
and the CreatedDate is 2007-02-27 16:48:39.327.

I figured out why some of my posts do not appear....

I added a
new post at 2/27/2007 6:48:39 PM,
the StartDate is 2007-02-27 23:48:26.000
and the CreatedDate is 2007-02-27 16:48:39.327
and the post appears perfectly.

At this point I started thinking... what is going on.... then it hit me...

I added another
new post at 2/27/2007 7:01:02 PM,
the StartDate is 2007-02-28 00:00:46.000
and the CreatedDate is 2007-02-27 17:01:02.600
and the post does not appear!!!!

Did you catch it????

The post will not appear until the date changes to 2007-02-28.... and I thought I was going crazy....

Below is the information you requested about the server's time zone and my time zone.

My Server is located in MST Time Zone in Phoenix, Arizona (GMT-7.00). I'm located in Ohio (GMT -5.00). I used the follwing code to get the current time on my server.

<%@ Page Language="C#" %>
<script runat="server">

void Page_Load()
{
time.Text=DateTime.Now.ToString();
}

</script>
<html>
<head>
</head>
<body>
<form runat="server">
In WebServerLand the time is currently:<asp:Label id="time" runat="server" />
</form>
</body>
</html>

I ran this script at 6:19:15 PM in Ohio and the page I created above listed the server time at 4:19:12 PM in Arizona.

I hope this helps....

Brian

3/13/2007 5:46:01 PM
Gravatar
Total Posts 23
Brian

Re: Blog Module - Items not listing

Joe...

I know you have been busy with things...

Have you had time to determine a solution to handle the StartDate being set in the future instead of being setting in the past like previous versions of mojoportal?

Again, I'm willing to work with you to test any solution to resolve this issue.

Thanks....

Brian

3/13/2007 6:57:48 PM
Gravatar
Total Posts 18439

Re: Blog Module - Items not listing

Hi Brian,

No I haven't had a chance yet but thanks for the nudge, I will try to get to it soon. I appreciate all the research you've put into the issue and think it will help.

Hopefully, I can look into this in the next few days.

Best,

Joe
3/14/2007 11:36:54 AM
Gravatar
Total Posts 18439

Re: Blog Module - Items not listing

Hi Brian,

I committed a change to svn branches/2.x that may have fixed this issue. I didn'y mange to reproduce it but probably could have if I waited till evening ;-)

I think I understand what was happening and hopefully this change will solve it.

Can you test and confirm?

Thanks,

Joe
3/19/2007 10:44:28 PM
Gravatar
Total Posts 23
Brian

Re: Blog Module - Items not listing

Joe...

Can you please let me know what file versions I need to download from svn branches/2.x to update my 2.2.1.6.1 installation to test these changes?

Thanks

Brian

3/21/2007 5:22:12 PM
Gravatar
Total Posts 18439

Re: Blog Module - Items not listing

Hi Brian,

If you are running release files you should probably wait until I make a new release with this fix, I will try to do that soon.

If you don't want to wait for me you can build your own release files as outlined below

When working from svn sourcecode the basic deployment steps I use are:

1. Rebuild the solution in Release mode
2. Use UnleashIt to deploy just the needed files with no c# source code to a local folder
3. Optional - if you plan to use MS AJAX enabled MyPage feature, replace Web.config and MyPage.aspx in the local deployed files with the ones from the AJAX-Extensions-Pak folder, also replace mojoPortal.Web.WebParts.dll in the bin folder of the local deployment files
4. Edit the web.config with any custom settings or use user.config to override connection strings and other settings in AppSettings section

5. Backup the db and the web site
6. deploy the local files using ftp and overwriting existing files

Thanks,

Joe
3/21/2007 5:23:35 PM
Gravatar
Total Posts 18439

Re: Blog Module - Items not listing

Oh, I also meant to link to this page which has more info on deployment with UnleashIt

http://www.mojoportal.com/deploymentfromwindows.aspx

Joe
3/24/2007 2:29:34 PM
Gravatar
Total Posts 18439

Re: Blog Module - Items not listing

Hi Brian,

I've just released a new set of files version 2.2.1.7, can you give it a try and confirm the fix?

Thanks,

Joe
3/24/2007 7:28:39 PM
Gravatar
Total Posts 23
Brian

Re: Blog Module - Items not listing

Hi Joe...

I added a
new post at 3/24/2007 8:11:32 PM,
the StartDate is 2007-03-25 00:11:14.000
and the CreatedDate is 2007-03-24 17:11:32.960
and the post appears perfectly.

So... I think the problem is fixed.... but I will continue to post test blogs on my site and let you know if I find any additional errors.

Thanks...

Brian

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