0

How should I convert historic local time to UTC taking into account of daylight saving?

The main problem is the daylight saving doesn't occur at a fixed period every year and hence I cannot think of a way to do this task.

1 Answers1

2

See https://github.com/mj1856/SqlServerTimeZoneSupport by Matt Johnson for Sql Server 2008R2+.

Serg
  • 1,266
  • 7
  • 12
  • do we have anything similar to from_tz of oracle in SQL Server or any other builtin function that does the job? – Prashant Bhanarkar Jun 24 '16 at 04:46
  • Really from_tz only marks datetime with the timezone. Operator for converting the value is AT TIME ZONE . It was introduced in Sql Server 2016. – Serg Jun 24 '16 at 07:07