PANVEGA’s Blog

DotNet Development, SharePoint Customizing, Silverlight, MS Infrastructure and other tips and tricks

Filter problems in Start-,End Time for CALENDAR “Full day event”

Posted by PANVEGA on April 14, 2009

When I make a request on a Calendar checking All Day Event it shows one thing. For now that is all right. However when I set a Filter showing just all Events from  [Today], the Event is still visible on the 3/29/2009. The Event shouild only be vusible on the 28th. Why ???????

When I view the request I see
Start Time: 3/28/2009 0:00
End Time: 3/28/2009 23:59

Example: http://8002.freesharepoint2007.com/Lists/Calendar/MyItems.aspx

Test: in a list of type calendar, create 2 calculated columns with the formula:
=[Start Time] and =[End Time]

You See in the View that the new field date values are not the same than the values sow in Start and End Time:

View Start Time: 3/28/2009 2:00
View End Time: 3/29/2009 2:59

Read more about calculated columns in my previous post:

https://panvega.wordpress.com/2009/04/14/calculated-field-for-the-calendar-date-filter-dropdown

Issue:

For full day events, the calculated value is later than the start and end date (which means that it actually shows the next end day). But yours may be different because my time zone is (GMT +1:00) plus 1 hour daylight savings.  That is why the Event is visible von both day (28th and 29th). I searched the Web and found that others were reporting the same issue.

Solution:

I tried out this theory on a test server, where I changed the time zone on both the web application and the server. But the difference was still +2 hours in the calculated fields, even after both an iisreset and a reboot.

I finally gave up and calculated START and End as “=[Start Time]-2/24″, which seems to work.

New Problems:

  • However I still have the problem with the DTS daylight saving. In Germany GMT+1, now however summer time +2 hours and winter just the regular +1 hour. First I wanted to use the calculation field with a IF statment, but it did not work.
  • Another issue came with the Calculatoin field =[Start Time]-2/24]. In my Calendar you can set the value “All Day Event” with you want. However if not enabled and using a exact time for Start and End Event, the hours from the calculatoin field were add as well. All Day Long enabled: I set 5:30 for ending, the calculation field sets the value to 10:30.
    So I tried a formula: e.g. =IF([All Day Event]=1;[Start Time]+5/24];[Start Time])
    The problem here is that All Day Event could not be choosen from the list and i receive an error message. One approach of this issue is showing just Start – and End Time  in the View and using the Custom Start – and Custom End Time values only for the View Filter Parameters in order to showing just Events from Today.

Test the GTM Time Zones: http://wwp.gmt2.net

Note: the time difference was not the same in Winter and in Summer, so you may need to take into account the daylight saving time

When in daylight savings mode, you need to set the time 1 hour earlier in both the staging environment and the destination server in order for deployment to work properly.

An other approach could be modifing a CAML Query field is contained in SCHEMA.XML found in the FEATURES directory. Each list has it’s own folder there.

I  hope Microsoft tweaks this in an Service Pack. And of course, that will break all of my custom columns …

Good Luck!!!

More Informations:

http://support.microsoft.com/?scid=kb%3Ben-us%3B888253&x=13&y=10

http://ablog.apress.com/?p=1366

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: