Skip to main content
TehOne's user avatar
TehOne's user avatar
TehOne's user avatar
TehOne
  • Member for 14 years, 4 months
  • Last seen more than 7 years ago
awarded
awarded
awarded
awarded
awarded
awarded
awarded
awarded
awarded
revised
SPQuery, Dates and Regional Settings
added 24 characters in body
Loading…
comment
SPQuery, Dates and Regional Settings
Ok, I may have spoken too soon. Even with this option the query is still sent to the DB with an automatic adjustment based on my regional settings... Oh SharePoint, how I hate thee sometimes.
answered
Loading…
comment
SPQuery, Dates and Regional Settings
Thanks for the reply and information. My biggest problem isn't getting things into or out of UTC. The problem is when I provide a UTC date to an SPQuery, it sends that date to the DB as the users local time instead of keeping it as UTC. Since I'm doing stuff that depends highly on date/time, this is causing results to be left off that should be included.
asked
Loading…
awarded
comment
Changing PublishingPage.Layout doesn't change the content type?
Just thought I'd come back an post an update on this. Just changing the page layout wasn't enough for me, I had to also set the ContentTypeId as @GavinB suggested. Here is a code snippet: page.Layout = newPageLayout; page.ListItem[SPBuiltInFieldId.ContentTypeId] = newPageLayout.AssociatedContentType.Id; page.Update();
awarded
awarded
comment
SharePoint list query efficiency
Thanks for the reply. The point about security trimming is a good point. There will be security placed on some individual items. A lot of the data won't have security, but some will. I will be using the modification date to only pull new items for "partial updates". But when I need to pull the full view again I need to pull the most recent 20 (or more or less) items in. Some of those items will already be in cache, so I don't need to fetch the full dataset for them from the db, I just need their ids to check against cache. Then for items not in cache, I need to go back for the full dataset.