FAQ Database Discussion Community


Daylight savings time in java

java,timezone,dst
My requirement is create a combo with all time zone IDs that adjust with "Daylight Savings Time" (DST). With getAvailableIDs() method I can have a list of timezoneIDs like this but the problem is I don't know which one is adjust with DST and ones that do not. So I...

java 1.6 daylight saving

java,date,timezone,dst
I'm working on a critical application which cares about daylight saving time change. I'm trying to simulate manually what could happen at runtime by comparing thow date which cross the daylight saving change, so I made the below test. My current location is Italy so the change from CEST (Central...

.NET TimeZone.CurrentTimeZone.GetDaylightChanges returns wrong DST for 2005

c#,.net,timezone,dst
I used the following code to display the Daylight Saving Time for the years between 2005 and 2035. For the year 2005, this page shows the DST is between April 3rd and October 30th. But the GetDaylightChanges returns March 13 and November 6th. Is the .NET GetDaylightChanges a reliable function?...

How to use Standard Time Only in TimezoneInfo.ConvertTime C#

c#,timezone,dst,datetime-conversion
I am having a Issue with the C# function of TimeZoneInfo.ConvertTime(). What i need to get is the Standard Time not the DST but i'm only getting DST is there a way to Tell the Function to only get the Result in Standard Time. My local Timezone is UTC -6:00...

TIMESTAMP WITHOUT TIME ZONE, INTERVAL and DST extravaganza

ruby-on-rails,postgresql,intervals,dst,postgresql-9.4
I'm working on a Rails application which stores all dates to PostgreSQL as "TIMESTAMP WITHOUT TIME ZONE". (Rails handles the time zone on the application layer which for this application is "Europe/Berlin".) Unfortunately, Daylight Savings Time (DST) becomes an issue. The simplified "projects" table has the following columns: started_at TIMESTAMP...

How to show updated time for DST countries?

php,datetime,phpmailer,dst
I am showing time for different time-zones and the problem is that my server is running PHP v5.3.25 whereas on my local computer I have v5.5.9 When I set a specific time-zone and display its time, my local computer shows it just fine but the server does not add hours...

How to convert a timestamp from one timezone to other

sql,timezone,teradata,dst
I have a table with TIMESTAMP column in Teradata. I want to consider the values stored in this column as if they are from 'America Pacific' timezone and convert it into GMT timestamp. I tried, select timestamp_col, timestamp_col at 'GMT' timestamp_col_gmt, timestamp_col at 'America Pacific' timestamp_col_pac, from table_name; timestamp_col timestamp_col_gmt...

JavaScript - Check for Daylight Saving for timezone

javascript,dst
I have a page which displays the local time for 10 cities around the world. However, because of the Daylight Saving Time (DST) one of the times is out by an hour. Using JavaScript, I want to be able to check for DST to ensure that the times displayed are...

Working with daylight saving time with the DateTime class

c#,c++,datetime,dst
I'm in the process of porting a C++ program to C#. The program needs to be able to read a file's "modified" timestamp and store it in a List. This is what I have so far: C# code: ret = new List<Byte>(); //list to store the timestamp var file =...

Eliminating Javascript daylight saving time gap, a cross-browser solution

javascript,date,cross-browser,timezone,dst
After lots of hassle I finally found the actual problem. It's the gap induced by daylight saving and the fact that different browsers act differently if timezone is set on UTC+3:30 (I'm not sure of other timezones). Here's a snippet to generate the problem (the problem is reproducible if your...

.Net DateTime with local time and DST

c#,.net,datetime,dst,localtime
I'm afraid I don't really understand how .Net's DateTime class handles local timestamps (I live in Germany, so my locale is de_DE). Perhaps someone can enlighten me a bit ;-) The DateTime constructor can be called with year, month etc. parameters. Additionally a DateTimeKind value of Local, Utc, or Unspecified...

Strange sybase behavior around daylight savings time (DST)

sybase-ase,dst
I've got a strange sybase behavior which I do not understand. Situation I have a table (MY_TABLE) with several columns of type smalldatetime. For illustration purposes let's assume the following table and data: MY_TABLE||ID |TS_INIT |TS_LASTCHANGE |MY_TEXT | ||4711|3/31/2013 12:00:00 AM|3/31/2013 3:00:00 AM|someText| TS_INIT and TS_LASTCHANGE are of type smalldatetime....

How to get daylight savings start and end for a time zone in Dynamics CRM?

javascript,datetime,dynamics-crm,dst,timezoneoffset
In CRM Online 2013, I need to determine the start and end dates of daylight savings time based on a specific time zone. I have code that needs to display times converted for different time zones, aside from the time zone in the current user's settings. For example, if the...