using (SPSite siteCollection = new SPSite("siteurl"))
{
SPWebCollection sites = siteCollection.AllWebs;
foreach (SPWeb site in sites)
{
DateTime dt = site.RegionalSettings.TimeZone.UTCToLocalTime(site.LastItemModifiedDate);
Console.WriteLine("site::::{0} Modified time::::{1}", site.Title, dt.ToString());
}
}
{
SPWebCollection sites = siteCollection.AllWebs;
foreach (SPWeb site in sites)
{
DateTime dt = site.RegionalSettings.TimeZone.UTCToLocalTime(site.LastItemModifiedDate);
Console.WriteLine("site::::{0} Modified time::::{1}", site.Title, dt.ToString());
}
}
No comments:
Post a Comment