Daylight Savings time in the UK

Daylight Savings time in the UK

Post by s.macgui » Tue, 23 Jun 1992 07:01:04



The problem is simple.  It takes an act of parliament to change the time
from GMT to BST (British Summer time).  Needless to say localtime() is
firmly stuck in the North American way.  Thus, many computers in the UK are
fudged by hand for the week or so that the US and UK are out of sync.

Have there been any changes to localtime(), or the TZ environment variable
to cope with this mess; I've seen some horrible things done to the TZ
variable in Brussels (lots of semicolons and numbers afterwards), but
wondered if there was any proper standard.

Thanks in advance.
___
Sean MacGuire                                           uunet!sobeco!sean
The MacLawran Group Inc, Montreal                       (514) 982-9688
                        "No insurance, no surrender"

 
 
 

Daylight Savings time in the UK

Post by Guy Harr » Tue, 23 Jun 1992 08:28:18


[Followups redirected to "comp.unix.misc"; it's not a C-language issue,
as different C language implementations handle time zones differently,
if they handle it at all.  "C: it's not just for UNIX any more!"]

Quote:>The problem is simple.  It takes an act of parliament to change the time
>from GMT to BST (British Summer time).  Needless to say localtime() is
>firmly stuck in the North American way.

True on some systems.  False on others.  The UNIX system on which I'm
typing this has the Arthur Olson time zone code, so it supports plenty
of different time zones, and new ones can be added or old ones can be
changed easily.

Quote:>Have there been any changes to localtime(), or the TZ environment variable
>to cope with this mess; I've seen some horrible things done to the TZ
>variable in Brussels (lots of semicolons and numbers afterwards), but
>wondered if there was any proper standard.

Unfortunately, the horrible syntax you saw is probably the one specified
by POSIX 1003.1 as a standard; while it's a "proper standard" in the
sense of being part of an Official Standard (POSIX 1003.1, which may
even be an ISO standard at this point), it's not a particularly proper
scheme for dealing with multiple time zones, given the horrible syntax.

Fortunately, POSIX 1003.1 leaves room to implement both the crufty POSIX
scheme and the nice Arthur Olson scheme in the same system; in the POSIX
scheme, you'd have to construct some string of the sort you saw, but in
the Arthur Olson scheme, setting TZ to "GB-Eire" is sufficient, and to
change the rules to match what the Act of Parliament in question
specifies, you edit a text file and "recompile" it with the "zic"
command.

Many UNIX systems these days have either a scheme like the POSIX one
(SVR3.1 and later have a scheme of that sort, although it only lets you
specify the start and end date for the current year; systems with the
full POSIX scheme let you specify a rule for the start and end date *as
long as it's sufficiently regular* - unfortunately, in many countries it
*isn't* sufficiently regular) or the Arthur Olson one or both.  (SunOS
4.x has the Olson scheme, and both in SunOS 4.1[.x]; SVR4 has both,
although not all SVR4 implementations necessarily come with the files
the Olson code requires - they may be supplied in the source you buy
from USL, but binary distributions might not have them; other systems
also have one or the other or both.)

 
 
 

Daylight Savings time in the UK

Post by Thomas Sippel - D » Wed, 24 Jun 1992 04:16:01


 -- The problem is simple.  It takes an act of parliament to change the time
 -- from GMT to BST (British Summer time).  Needless to say localtime() is
 -- firmly stuck in the North American way.  Thus, many computers in the UK are
 -- fudged by hand for the week or so that the US and UK are out of sync.

Very easy, no fudge, no mudge.
See the POSIX standard (IEEE 1003.1) Section 8.1.1 (page 142 in my copy).
Basically, for the UK the following should work:

TZ=gmt0bst-1,M3.5.0,M10.5.0 export TZ      (or csh similies)

where gmt and bst are the mnemonics, 0 and -1 the offsets from uct, 0:30
would be half an hour, etc.

M3 is March, week 5 is by definition the last week, day 0 is a Sunday,
regardless of whether a fifth Sunday exists in March (this year it did).

If you don't like changing at 2:00:00, use date/time. As there is no
implied summer time, it is also useful in the southern hemisphere.

You can also use n as day number, based on 0 and counting all, thus 3
describes the fourth of January, and 60 March 1 in a leap year. Or use
Mn based 1, so M60 describes March 1 in any year, M59 for Feb 28.

Its great when you have no need to communicate those Julian dates to others,
and it even works on our SUNs and Decstations. Don't know about HP/UX,
on Aix and Irix it did not work last March.

                                        Thomas
--
*** This is the operative statement, all previous statements are inoperative.

*   voice: +44 715 895 111 x4937 or 4934 (day), or +44 718 239 497 (fax)
*   snail: Imperial College Center for Computing Services, Kensington SW7 2BX

 
 
 

Daylight Savings time in the UK

Post by Rene Mads » Wed, 24 Jun 1992 18:27:08




>  -- The problem is simple.  It takes an act of parliament to change the time
>  -- from GMT to BST (British Summer time).  Needless to say localtime() is
>  -- firmly stuck in the North American way.  Thus, many computers in the UK are
>  -- fudged by hand for the week or so that the US and UK are out of sync.

> Very easy, no fudge, no mudge.
> See the POSIX standard (IEEE 1003.1) Section 8.1.1 (page 142 in my copy).
> Basically, for the UK the following should work:

> TZ=gmt0bst-1,M3.5.0,M10.5.0 export TZ      (or csh similies)

              ^
              |
              |
On SCO ODT 2.0 (still) this must be a semi-colon (;). As my documentation
explain the same as the above this is probably a bug.

-Rene
---
Rene Madsen                |   Voice: +352 453210    |   "This field is
Unix Systems Support/Dev.  |   Data:  +352 251099    |   intentionally

 
 
 

1. Daylight Savings Time in UK

Yes.  See ftp://elsie.nci.nih.gov/pub/tzdata96f.tar.gz for details.
You can use this for your new `europe' file, if your `zic' is sufficiently
up-to-date.  (If it isn't, get tzcode96e.tar.gz and use its `zic'.)

Actually, the UK rule changed in 1990 to be the first Sunday on or after 10-22.
The two rules had identical effects until last year.

And there was an earlier rule change in 1981 that changed the autumn
switchover time from 03:00 to 02:00.

They don't always, but in this case they did.
The new rule, the 7th EC summer time directive,
was announced by the EU on 1994-05-30 (94/21/EC)
and was confirmed by the UK on 1994-11-16 (SI 1994/2798).

2. C-shell help

3. Daylight Savings time, system time, hardware time....

4. "try - What is it? HELP

5. Exact time for Daylight Savings Time change

6. Tape FAQ?

7. Olympic Daylight Savings Time...

8. HELP : with arrays

9. daylight savings time?

10. Linux Time setup - Daylight savings

11. Daylight savings time - setup

12. How to set daylight savings time in Linux?

13. daylight savings time...