GMT -> BST?

Associate
Joined
10 Feb 2004
Posts
198
Does anyone know a formula for calculating when we change to and from British summer time. I know its the last Sunday in March, and the last Sunday in October, but I'm looking for a way of calculating it.

Any info would be great :-)
Bill
 
Any perticular reason? Reason I ask is because it might be that I can help with the larger problem here. Unless it is just to find a formula for daylight savings.
 
Go to March.
Find Last Day.
Go backwards until you hit Sunday.
Target Reached.

Repeat for October.

That will give you the day the clocks change.
What exactly is it you want and what do you need it for?
 
Cheers Haircut, that is one way of doing it.

However, I'm sure there is a more "elegant" formula. Probably one that doesn't need to know the years calendar.

I have a computer system that has a clock built in. But the clock doesn't take any account of daylight saving. So what I was hoping for (in an ideal world) is a formula that you can use every time you read the clock to see if there should be an hour added/subtracted etc.

Cheers for the help so far.
 
Cheers Haircut, that is one way of doing it.

However, I'm sure there is a more "elegant" formula. Probably one that doesn't need to know the years calendar.

I have a computer system that has a clock built in. But the clock doesn't take any account of daylight saving. So what I was hoping for (in an ideal world) is a formula that you can use every time you read the clock to see if there should be an hour added/subtracted etc.

Cheers for the help so far.

if its before daylight saving subtract an hour, otherwise do nothing....:confused:
 
This might be worth a look. Allows you to find out what day of the week any particular date will be. Used in conjunction with Haircut's method should work without having to store any extra information.
 
It's a lot easier that it used to be. It's now quite simple. Last Sunday in March and October. And the change always takes place at 01:00 GMT.

Before it settled on that, one of them, can't remember whether it was the March or the October one, was day after the fourth Saturday in the month.
 
Snooksy, Ta for that. Just the type of thing I'm looking for. And to be honest, so far, the best contender!

clv101, in my system, its difficult to change the time on the clock so we never do it. So for example its always set to GMT. Then on top of that we only ever read it during initialisation at switch on, so maybe once a day. Then it makes sense to re-calc daylight saving every time. Or at least I can't think of a better way to do it! Oh for an operating system!!
 
Back
Top Bottom