All Questions
Tagged with dst sql-server
32 questions
0
votes
0
answers
79
views
The datetime columns in all the tables on SQL server have shifted by a few hours
I've created a few tables all of which had a column of datatype datetime. Recently, I think after the daylight savings adjustment, for some reason all the dates have shifted by a few hours i.e. '2022-...
0
votes
0
answers
577
views
How to retrieve User-defined Timezone's Localtime using sys.time_zone_info
The application allows users to define their time zone
screenshot.
But in SQL Server, time_zone_info is not the timezone selected by user.
So how could we map/relate the user defined time zone with ...
6
votes
4
answers
2k
views
Day light savings time is resulting in incorrect dates in database
BACKGROUND:
I have an issue with the day light savings time change. Any records entered into the database (side note: I have no access to the script/code which enters this data to fix it) between ...
-1
votes
1
answer
107
views
ConvertZone() returns NULL using TZDB SQL Server Zone Support
We are running SQL Server 2008 R2, so for Timezone stuff we use Matt Johnson's SqlServerTimeZoneSupport/
We convert datetimes on the fly using ConvertZone for our clients. Some Australian states ...
1
vote
1
answer
116
views
Proper way of getting rows since a date accounting for DST?
I have a datetime column, changedate, that I need to use to get rows that have changed in the last week since 1PM. This column is unfortunately in local time (EST). The server is Microsoft SQL Server ...
0
votes
3
answers
5k
views
Convert UTC on Azure to EST Time (including Daylight saving Time-dynamic version)
I have a question about converting UTC time zone to EST time zone since I am still new to SQL language and Azure platform. In log file, I used system built-in function "GetDate()" in log file to get ...
1
vote
2
answers
3k
views
How to get the start and end of a day in T-SQL when daylight savings is enabled?
I am currently working on a SQL Server script where we collect aggregated data on a daily basis for last 'n' days. In order to do this, we create a temp table with the start time and end time for all ...
0
votes
1
answer
98
views
DateTime stored in SQL Server DB does not account for daylight savings time. How can I fix this when I pull it out?
A machine that I do not have control of logs datetimes in EST. It doesn't switch for daylight savings time. When I pull data out it screws up all my reports by an hour. Is there a way to fix this in ...
1
vote
1
answer
532
views
Get DST Start and End Date for any Timezone
I see this question asked quite a bit, but don't see any actual answers (most solutions are for US time zone specifically).
Is there a way in SQL Server to get the start and end date of daylight ...
1
vote
3
answers
4k
views
UTC to EST SQL Server 2008
We have data in SQL Server 2008, with multiple date time columns. As date format in SQL Server is a big integer value i.e. number of seconds since 1970, we are using DATEADD() function to convert it ...
2
votes
1
answer
624
views
SQL Calculate duration of time in hours crossing DST boundaries
In our system we have a Stored Procedure that creates shifts for users. These shifts have a specified start/end time and a duration. When these shifts cross a DST Boundary, the duration comes out ...
0
votes
1
answer
384
views
Is there any Way that we update our time zone database according to Daylight Saving Time (DST)
I have a table in my database which stores time zone information with country code.
Now I want to update this table whenever Daylight saving time is applied for that country.
Any Free API available ...
0
votes
0
answers
75
views
DateTime calculation including DST and UTC
I have a (maybe) simple problem calculating the correct DST DateTime in Sql Server 2008 query. Let me explain:
We have a table, lets say T_User, with some columns regarding user data which can be ...
0
votes
2
answers
2k
views
SQL Server for finding next European Summer Time date
I have one table in SQL Server where I want to add a column that will show this year's date for the exact transition dates for European Summer Time.
European Summer Time is observed across three ...
2
votes
1
answer
4k
views
Daylight savings time and UTC time
We use a program that saves the time-stamps in UTC time. We are a local to Utah company so we are affected by Daylight Savings time.
For example if we receive a call right now it is 12:52:00 MST and ...
2
votes
1
answer
4k
views
Daylight Saving Time not working in TimeZoneInfo, when converting from UTC to Local
I'm working on an ASP.NET/C# application, which supports time zones.
First let me explain the flow of the application, I'm storing an object for purchase order. So it has the datetime field in it.
...
0
votes
3
answers
6k
views
Managing Time zone and Daylight Saving in SQL Server
We currently are trying to implement time zone management in our application. Our server is in India. We will be saving all entries in server time. But when coming to the client side, we need to show ...
0
votes
1
answer
133
views
SQL Function help- Daylight Savings calculation
All,
I wrote a function that essentially takes a timestamp and a shopper ID, and based on that shoppers zipcode work out the UTC offset and correct the time.
The problem I am having is: it's sloooow!...
0
votes
0
answers
118
views
Date function that calculates time difference and DST between EST and London time (SQL Server)
Currently I have a function:
CREATE FUNCTION USER.sysdate () RETURNS DATETIME AS
BEGIN
DECLARE @Result DATETIME
SELECT @Result = DATEADD(hour, -5, getdate())
RETURN @Result
END
;
But it ...
0
votes
1
answer
232
views
Incorporate DST into SQL script
My original question was too compact and all over the place so I tried to clean it up here. Trying to figure out how to properly implement DST into my SQL script for USA.
a.ActualEnd = DateTime value ...
1
vote
1
answer
118
views
Symfony2 and PHP affected by DST, how do I stop this from affecting me?
In my Symfony 2 project we need to store a variety of information using dates and times. Currently in the database we are storing all of that information using date for the column type. And everything ...
2
votes
2
answers
4k
views
Need a SQL Server function to convert local datetime to UTC that supports DST
We are migrating an application to Azure, but currently all of our dates are stored as Eastern Standard Time. Since SQL Azure is on UTC and many of our dates are generated from a getdate() call, we're ...
3
votes
1
answer
1k
views
MS SQL Server story for TimeZones and DST (do we need to reinvent wheel?) [closed]
I'm looking for suggestions and personal experiences with time localizations in TSQL and sql job scheduling (We are using SQL Server 2012).
I came across those situations where I would need more ...
0
votes
1
answer
2k
views
Check if DST is on according to UTC time in sql
I am working in MVC4 project where i am facing problem with time.Actually my project requirement is to show all time used in application according to Brazil time.So i have used GETUTCDATE() for saving ...
3
votes
1
answer
9k
views
Getting a local date/time for a specific timezone in SQL Server
Using SQL Server 2008+. SQLCLR is not an option.
I have a situation where I have data all stored in UTC. I need to do a comparison against that data by determining what a certain local time, let's ...
5
votes
3
answers
11k
views
Determining remote daylight saving in sql server
I want to determine the if daylight saving time is active or not, but in a region different to where my server is located.
My problem is I want to check the daylight saving of London and my server ...
2
votes
2
answers
5k
views
Check whether daylight savings is on or off
In a scenario, I have to check whether daylight savings is in effect or not. Based on the outcome of the check, I have to do some calculations in a SQL server procedure.
What is the best way to ...
2
votes
1
answer
3k
views
Handle Daylight Saving Time on SQL Server
Hi is there a function on SQL Server that can identify if Daylight Saving Time is active or not.
where i created a scalar function that converts the server time to plant location time who uses the ...
2
votes
1
answer
956
views
Determine current DST status when I don't observe DST in my timezone (SQL Server)
I'm receiving data feeds from a number of different servers across the country, and the items come in timestamped with GMT. I know the GMT offset for each of the locations for standard time, but I'm ...
2
votes
1
answer
2k
views
Daylight savings time support for datetimeoffset (SQL Server)
If you take a look at this help topic in MSDN:
SQL Server Date and Time limitations
it says: "No server-side daylight saving time (DST) support for datetimeoffset."
Can anyone explain what ...
1
vote
2
answers
1k
views
SQL Server - Get time (daylight savings aware) from another time zone
I'm looking for a way in SQL Server without using the .NET framework to find out the time in a given time zone, paying attention to daylight savings. However, this method also needs to take account ...
4
votes
2
answers
9k
views
Can I convert between timezones in SQL Server?
Right now I'm storing a number of records in SQL Server with a DATETIME column that stores the current timestamp using GETUTCDATE(). This ensures that we're always storing the exact date without ...