dst

How should I determine next daylight saving time (DST) transition for a timezone in Perl?

I'm working on a world clock web application, and I'd like to add a function to note how and when each location will next undergo a DST change. I'm using the DateTime and DateTime::Timezone CPAN modules, which seem to provide every conceivable function apart from this one! DateTime::Timezone is an implementation of the tz/Olson database...

Convert somebody's local time to the UTC time

Hi, i'm a little lost in the timezone :) I have data stored with the time in UTC. The server is in the Netherlands, so we live in utc+1 (now, with daylightsavingtime, in utc + 2) Now a client says: give me the data from august 5th. So i have to calculate the utc time from 'his time'. For that i have to know: what is your utc offset...

Historical daylight savings in Windows

Is there a easy way in Windows (using Delphi, not .NET) to convert UTC times to a local time, with daylight saving adjustments. Data goes back 12 years, so needs to take account of changes in DST start/end dates over that time. ...

Rfc 1123 in python

Hi guys. Just want to use 'datetime' or 'time' modules. I based the following code on this question: import time def rfc1123 (gmt): weekday = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"][gmt.tm_wday] month = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][gmt.tm_mon] return "%s, ...

Daylight Savings Time not calculated properly in Rails 2.3.5?

Hello, I have a very strange issue with Daylight Savings Time (DST) in my app. For some reason, whenever I receive a time from the table, it doesn't adjust itself for DST. For example, if I create a new Time in the console, in the appropriate time zone, write it to the database, and then try to retrieve it from the database, it comes ba...

Linux, timezone and dst

Hi all, I'm using RHEL 5.3 (linux 2.6.18) I have a legacy code that relies on timezone and dst returned by ftime(3). Now from ftime(3) man pages I see that timezone and dstflag are not supported. Also in gettimeofday(3) those fields are not supported. How I can retrieve timezone and dst? Thanks ...

Get timezone offset for a given location

Is it possible in PHP to get the timezone offset for a given location? E.g. when given the location "Sydney/Australia" to get the timezone offset as "+1100". Bonus would be for this function the keep daylight savings in mind (i.e. it's aware of daylight savings and adjusts the offset according). ...

JAVA TimeZone issue EDT Vs EST

Hi Folks, I a newbie to java and hence haven't been able figure this out since quite some time. I am using Windows XP and the machine is set to TimeZone: Eastern Time (US & Canada). I have a Java application, which takes the current system time and timezone info and writes a string like: 20101012 15:56:00 EST, to a file. The last pi...

rails' utc_to_local and daylight savings time

> e = Event.first > e.registration_start_utc #registration_start_utc is a datetime column => Sat, 23 Oct 2010 06:38:00 UTC +00:00 > e.registration_start_utc.utc? => true > ActiveSupport::TimeZone.find_tzinfo("America/New_York").utc_to_local(e.registration_start_utc) => Sat, 23 Oct 2010 02:38:00 UTC +00:00 2 questions about this: ...

Joda Time problem with Daylight Saving change and date time parsing

I have the following problem using Joda Time for parsing and producing date and time around Daylight Saving hours. Here is an example (please, note that March 30th 2008 is Daylight Saving change in Italy): DateTimeFormatter dtf = DateTimeFormat.forPattern("dd/MM/yyyy HH:mm:ss"); DateTime x = dtf.parseDateTime("30/03/2008 03:00:00"); int...

Detect if a date is in Daylight saving time in MySql

I have inherited a legacy application where all the dates and times are stored in the local timezone (UK). I am not in a position to change how these are stored. However, the requirement is to display all the dates in GMT within the app. Therefore when I retrieve a list of events from the database I need it to display them all in this ...

Javascript Date objects and Daylight Savings Time

I'm seeing some behavior I don't understand with Javascript date objects and DST transitions. If I execute the following in Chrome's javascript console var date = new Date(1268535600000); //2010-03-14T03:00:00.000Z (21:00 03-13 America/Chicago) for(var i = 1; i <= 12; i++) { var time = date.getHours(); console.log(time) ...

Arizona TimeZone Day Light Saving

I am trying to get current time in specific time zones. I tried following code. Calendar j = new GregorianCalendar(TimeZone.getTimeZone("US/Mountain")); j.setTimeInMillis(Calendar.getInstance().getTimeInMillis()); System.out.println(j.get(Calendar.HOUR_OF_DAY)+":"+j.get(Calendar.MINUTE)); TimeZone tz = TimeZone.getTimeZone("US/Mountain"...