SharePoint: DateTime UTC fields

When defining SharePoint DateTime fields, it is possible to define them as UTC, adding the following parameters:

StorageTZ = "TRUE"

In this way, the date will be saved indipendant of the regional settings of the user. The net result will be that the display date will vary based on the regional settings of the user.

This behaviour is described in the article What does StorageTZ = "TRUE" mean.

 

And in the article SharePoint Web Services and UTC time fun and games it is described the field behaviour in more detail.

Deploy DLL and admin rights

Sometimes, when working with corporate machines, it can happen that you have security issues that make your SharePoint development harder.

One of these problems is that even if you are machine administrator, or you have started Visual Studio as administrator, you still have problems with deploies, or you have DLL locked in the GAC and you are not able to update/delete them.

The solution to this problem is to remove the admin approval from the local policies:

  • run the Local Security Policy MMC snap-in (from the start menu, run, type Local);
  • go to Security Settings | Local Policies | Security Options
  • disable "User Account Control: Run all administrators in Admin Approval"
  • reboot the machine

I've seen this trick in the blog post Access Denied trying to uninstall assemblies from GAC.

SharePoint 2010: Fixing page layouts during creation of pages via feature

When you deploy pages in WSP, you can follow the instructions in this link: SharePoint 2007: how deploy pages and web parts via feature.

 

But if the site a publishing site, after the deploy there will be an error saying that the page layout is invalid. So, there are two choices: