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.
You must sign in to post in the forums. This thread is closed to new posts.