2

I have created a SharePoint application which has a specific time zone.
The Windows server where SQL Server and SharePoint are installed are using same time zone.

When I create a new item in list in SharePoint it shows some different time zone time.

I don't know why this is happening but I suspect this is because of SQL Server. If I query current date and time in SQL Server then it shows correct time zone but in SharePoint it is showing different times.

What could be the reason?

2

SQL Server gets its time Zone information from the operating system on which it is installed. So if SELECT GETDATE() reveals the right information, then SQL Server is most likely not the problem.

You can query the registry on your SQL Server, if you have the appropriate permissions, and see what the server's time zone is set to:

    DECLARE @TimeZone NVARCHAR(255)

EXEC master.dbo.xp_instance_regread 

N'HKEY_LOCAL_MACHINE', 

N'SYSTEM\CurrentControlSet\Control\TimeZoneInformation',

N'StandardName',

@TimeZone OUTPUT


SELECT @TimeZone

That should tell you what time zone your SQL Server thinks it is in.

I would suggest that the issue is either the client on which you are running the SharePoint application session - or more likely a setting in SharePoint itself or the server time zone on the SharePoint server itself.

You can check the regional settings for a site and see what it reports. This link should help get you started there.

| improve this answer | |
0

Turns it this was a problem in SharePoint as the site collection was using different time zone than web application. I fixed it by going into Site Settings of that site collection.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.