dst

How do you determine Daylight Savings Time in VBA?

What function will let us know whether a date in VBA is in DST or not? ...

CTimeSpan.GetDays() and daylight savings time

I found in a bug in an old C++ MFC program we have that calculates an offset (in days) for a given date from a fixed base date. We were seeing results that were off by one for some reason, and I tracked it down to where the original programmer had used the CTimeSpan.GetDays() method. According to the documentation: Note that Daylig...

Has the daylight savings rule change invalidated the C runtime library?

Some time ago I put together a time based library that could be used for working out relative times within a year for someone. I noted at the time, that it did the one hour shift in both directions for daylight savings. It just occurred to me that Congress changed the daylight savings time rules. I don't recall seeing any information...

In Oracle, how can I detect the date on which daylight savings time begins / ends ?

Is there a way in Oracle to select the date on which daylight savings will switch over for my locale? Something vaguely equivalent to this would be nice: SELECT CHANGEOVER_DATE FROM SOME_SYSTEM_TABLE WHERE DATE_TYPE = 'DAYLIGHT_SAVINGS_CHANGEOVER' AND TO_CHAR(CHANGEOVER_DATE,'YYYY') = TO_CHAR(SYSDATE,'YYYY'); -- in the current year ...

.NET DateTime.Now returns incorrect time when time zone is changed

This problem occurred during daylight saving time change. After the change occurred, we've noticed that our server application started writing into the log incorrect time - one hour ahead which means that .NET caches time zone offset. We had to restart our application to resolve this problem. I wrote a simple application to reproduce thi...

PHP date issues with daylight saving

I've got a very strange bug cropping up in some PHP code I've got. The page is managing student enrolments in courses. On the page is a table of the student's courses, and each row has a number of dates: when they enrolled, when they completed, when they passed the assessment and when they picked up their certificate. The table data is ...

Common format for time zone in Java/J2me

We are developing a j2me app for syncing contacts to/from a server. we are storing the update and create time (long mill sec) with each contact for conflict resolution/sync calculations. Now as the client and server app can be in different time zones , how one can store time with time zone in a standard format (to take care diff time zo...

Oracle TIMESTAMP WITH TIMEZONE named zone vs offset

In oracle, is the named timezone always stored? I have been testing this column within our system, and in some places the timestamp is shown as: 26-FEB-09 11.36.25.390713 AM +13:00 but other times it's: 26-FEB-09 11.36.25.390713 AM Pacific/Auckland If the value is being stored as the former, does that mean the actual timezone is n...

What all do I need to do in a support environment before Daylight Savings starts?

Hi all, My company is supporting the following applications for an US client: IBM Mainframe , DB2 , Unix , Teradata , Oracle , SQL Server 2005 , Lawson Since Daylight Savings will start by next month, I would like to know your general thoughts about what all we should be careful about so that we can avoid any bad incidents? Thanks, V...

Problem in Daylight Saving Time Switch

A program I wrote about four years ago, which gets the date and time as follows: get_the_date_and_time(char *string) { struct tm *now; time_t lt; lt = time(NULL); now = localtime(&lt); sprintf(string,asctime(now)); } It is returning the time an hour late since the switch to Daylight Saving Time. By changing my sy...

Python tzinfo and daylight time

(I am new to Python and Google App Engine, please forgive me if my questions seem basic). I'm having a helluva time trying to manage multiple user timezones in my Google App Engine application. Here are my constraints: If a user enters the time on an input, it will be local time (including DST, when appropriate). If a user does not e...

PHP Set time to Pacific daylight saving time

In a PHP site, I have the current time setting: D j M Y, G:ia How do I change that to reflect current pacific time with the daylight saving time? ...

Get Daylight Saving Transition Dates For Time Zones in C

In C, is there a simple, cross-platform way of retrieving the dates that a given timezone begins and ends daylight saving? I already have timezone offset information and whether or not daylight savings is currently being observed, but I really need the dates at which daylight savings begins and ends (for an external dependency I don't...

Is it possible to get a timezone in python given a utc timestamp and a utc offset?

I have data that is the utc offset and the utc time, given that is it possible to get the users local timezone (mainly to figure if it is dst etc. probably using pytz), similar to the function in php timezone_name_from_abbr ? For example: If my epoch time is: 1238720309 I can get the utc time as: d = datetime.utcfromtim...

In J2ME, how can I tell whether or not Daylight Saving Time is enabled?

How can I get whether or not daylight saving time is switched on? (Because if it is on, the Calendar.HOUR_OF_DAY is (for example) 11 instead of 12.) Or should I use another way to get the hour of day? ...

Converting Between Local Times and GMT/UTC in C/C++

What's the best way to convert datetimes between local time and UTC in C/C++? By "datetime", I mean some time representation that contains date and time-of-day. I'll be happy with time_t, struct tm, or any other representation that makes it possible. My platform is Linux. Here's the specific problem I'm trying to solve: I get a pair ...

TZ4Net: DST abbrev for a time zone

In TZ4Net, if you have an OlsonTimeZone instance, you can say tz.IsDaylightSavingTime(someDateTime), and use that to display tz.StandardName or tz.DaylightName. Great. I want the standard/daylight abbreviation. I only see ways to get the standard abbreviation (tz.Abbreviation, say). Is there a way to get this? Am I missing something...

How to subtract two dates, ignoring daylight savings time in PHP?

I'm trying to calculate the number of days between two days, but I'm running into issues with Daylight Savings Time. Here's my code: function date_diff($old_date, $new_date) { $offset = strtotime($new_date) - strtotime($old_date); return $offset/60/60/24; } Works fine as long as the days are both within the same DST period: e...

DateTime difference operator considers daylight saving?

As far as I know the difference operator of the DateTime type considers leap years: so new DateTime(2008, 3, 1) - new DateTime(2008, 2, 1) // should return 29 days new DateTime(2009, 3, 1) - new DateTime(2009, 2, 1) // should return 28 days But what about daylight saving? ...

Can someone explain how a DaylightSavingsRule can have a "StartMonth" after it's "EndMonth"?

Using C# (the .NET framework), I'm looping through all the TimeZones and their AdjustmentRules... and for "Mauritius Standard Time" {(GMT+04:00) Port Louis)} - the adjustment rule is as follows: IsFixed = false; DaylightTransitionStart.Month = 10; DaylightTransitionEnd.Month = 1; From what I understand, 'IsFixed=false' means that I do...