I have a method on my code that stores the birthday of users on a Sharepoint profile property (BirthDay).
This property only accepts the format "yyyyMMddHHmmss.0Z" so i have the following code:
_profile[PropertyConstants.Birthday].Value = birthday.ToString("yyyyMMddHHmmss.0Z", CultureInfo.InvariantCulture);
The problem is, when it converts the date, it always gives me a day less than the actual dateTime i'm using.
Let's say i have the following:
DateTime bDay = new DateTime(1972, 10, 02); DBField = bDay.ToString("yyyyMMddHHmmss.0Z", CultureInfo.InvariantCulture);
When i check on the profile of the user, the date in there is 10/01/1972 instead of 10/02/1972.
I'm in Brazil so i don't know if it's a CultureInfo thing (already tried our CultureInfo("pt-BR") and still gives me a day less) or what.
Any ideas how can i make it not take that 1 day off?
Thanks in advance.