DST, Daylight saving time problems
http://en.wikipedia.org/wiki/Daylight_saving_time
http://en.wikipedia.org/wiki/Daylight_saving_time_in_the_United_States#2007_to_the_present
http://www.inrim.it/res/tf/ora_legale_i.shtml
Was having some problems during three weeks per year because I'm trading the GBL (CET) but using US time for all other futures (CST). Now have fixed them like this:
I've fixed it like this. Say I want a system to be started at 9.00 CST, because that's 16.00 CET at the EUREX (Central European Time). With daylight savings time changes (earlier in US than Europe, and viceversa in the Fall), for 3 weeks every year I will be screwed, because the US Central Standard Time will be behind not 7 but only 6 hours, since it will move one hour ahead two weeks early and it will subtract that hour again one week later, according to this schedule:
Sunday, March 14, 2010 USA starts DST
Sunday, March 28, 2010 EU starts DST
Sunday, October 31, 2010 EU ends DST
Sunday, November 07, 2010 USA ends DST
Sunday, March 13, 2011 USA...
Sunday, March 27, 2011 EU
Sunday, October 30, 2011 EU
Sunday, November 06, 2011 USA
So for those 3 weeks, it will have one extra hour (the sun will set one hour later), and CST will be one less hour behind CET. So, according to this simplifying drawing:
I will want to detect those 3 mother ****ing weeks, where CET is first behind 2 weeks in implementing DST (mother ****ers), and then early one week in cancelling DST.
I do so by detecting those 3 weeks with this function, which relies on the next discrepancy dates, and when both are TRUE, I multiply that TRUE value by 1, thereby getting a result of 1:
=AND(TODAY()>A39,TODAY()<A40)*1
That result of "1" then gets used by the ThisWorkbook Private Sub Workbook_Open() macro, like this:
Application.OnTime TimeValue("09:00:00") + TimeValue("01:00:00") * s.Cells(36, 2), "gbl.open_GBL_ID"
If the value is a "1", one extra hour gets added and the GBL_ID gets opened at CST 10.00, which is actually the same CET of 16.00, because in those 3 weeks Europe is only 6 hours ahead. If the value is a zero because we're not between the mother ****ing discrepancy dates, and we get a FALSE times "1", which returns a zero, then no extra hour is added to CST and the resulting time will still be 16.00, because we won't be six but seven hours ahead.
Thanks US and EUROPEANS mother ****ing politicians for giving me this headache by not agreeing on just one DST schedule.
On top of all this, I also added an alarm which will alert me when I can set the next discrepancy dates (after the last discrepancy is over).
As if this weren't enough of a headache, at work, I have to help everyone with their excel headaches, and even got told that I have to hurry (the boss basically told me that now instead of having one priority, I have 2 priorities, out of 2 things I am doing), while everyone else goes about the coffee breaks business as usual, with carefree spirit and laughters and all that... everyone is relaxed except me because I refuse to be careless, so I get burdened with everyone's work. But one day I will say "buffer overload" and they'll be in trouble. I am close to being overloaded.
Luckily I am on a part-time schedule, so they can try to squeeze me as much as they want, but at 4 PM at the latest I take off.
No ****!!!
Maybe I got it all wrong, after all this talking and thanks to the post I am realizing it.
If it's 00 CST, then usually it is 7 AM. If it is 01 CST, then it is 8 AM CET and my GBL systems need to be started. Now DST for sure advances clocks by one hour.
Now. If DST starts earlier in US, CST will advance by one hour before us (by 2 weeks) and will stay advanced for one week longer.
During those 3 weeks, I will wake up and see my CST computer (I use CST despite being in Europe) time not at 0 any more but at 1 AM, when I wake up at 7 AM. Now the GBL won't start for another hour, so it will start at 2 AM CST. On this I have no doubts.
Now, if I want in those 3 mother ****ing weeks my GBL to start at the right time, I want its CST schedule to say "start GBL at 2 AM", so that is... yes, one hour more. It is so goddamn confusing.
So it is correct but I explained it all wrong in the drawing above, because I am never concerned with the CET vs CST time, but just concerned when, in CST, my GBL systems have to be started, and
in the three goddamn weeks, the GBL needs to be started one CST hour later.
So, I was right but my drawing is wrong and misleading and I will now draw and post another one.
No wait... the drawing represents correctly the CST vs CET differences so I should just add what difference it makes in my trading.
I've got some goddamn xanax left over in my brain, I can't be this stupid...
Ok, the drawing was confusing, whether it was right or wrong, so the final drawing is just this, once and for all: