dk@sysdes.UUCP (04/02/86)
The current version (USG at least) of localtime in UNIX allows you to set whether a time zome has Daylight Saving Time, but no obvious method of changing the days on which DST takes effect. The UK (please correct me if I err) seems to resort to Parliamentary announcements (or other black arts) to set DST, so hard-wiring it as now is not on. I've seen versions on some U*X systems which append numbers to the TZ environment variable, and it wouldn't be hard to make our system do the same. However, it would be nice to know whether anyone knows of a fairly *standard* fix, so that there won't be a proliferation of slightly different and nonportable versions.
neil@uk.ac.man.cs.ux (Neil Todd) (04/02/86)
In article <234@sysdes.UUCP> dk@sysdes.UUCP writes: . . > >The UK (please correct me if I err) seems to resort to Parliamentary >announcements (or other black arts) to set DST, so hard-wiring >it as now is not on. > Stand corrected, I've had the following ctime.c in various machines for some time now. /* * The European tables ... based on hearsay * Believed correct for: * WE: Great Britain(WRONG use gbdaytab), Portugal? * ME: Belgium, Luxembourg, Netherlands, Denmark, Norway, * Austria, Poland, Czechoslovakia, Sweden, Switzerland, * DDR, DBR, France, Spain, Hungary, Italy, Jugoslavia * Finland (EE timezone, but ME dst rules) * Eastern European dst is unknown, we'll make it ME until someone speaks up. * EE: Bulgaria, Greece, Rumania, Turkey, Western Russia * * Ireland is unpredictable. (Years when Easter Sunday just happens ...) * Years before 1983 are suspect. */ /* NCT addition */ static struct dstab gbdaytab[] = { 0, 91, 303, }; What DOES really bug me is that only Britain and Portugal use what Unix calls WET (Western European Time). Why, oh why can't they just let us use GMT and BST (British Summer Time). I'm pretty sure that there are more sites in Britain than in Portugal. I asked UCB but was met with a deafening silence.
rcodi@Unison6.OZ (Ian Donaldson) (04/04/86)
> The current version (USG at least) of localtime in UNIX > allows you to set whether a time zome has Daylight Saving Time, but > no obvious method of changing the days on which DST takes effect. > Thats not the only problem - how do you cater for timezones that aren't a multiple of 1 hour distance from GMT? The TZ variable allows saying TZ=xxxyzzz where xxx is the normal name of the timezone (without DST), y is the number of HOURS from GMT (that has to be changed in heaps of shellscripts when daylight savings starts and ends), and zzz is the name of the timezone when DST is in effect. I rekon that the BSD way of keeping the timezone info in the kernel is more sensible, as it guarantees uniformity for all processes in the system. Perhaps a cron script particular to each machines' timezone can be used to alter DST at appropriate times of the year for those countries that seem to keep changing DST (by adb'ing the kernel? - Yuk!) ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Ian Donaldson ACSnet: rcodi@Unison6 UUCP: ...!siesmo!munnari!Unison6.rmit.oz!rcodi CSNET: rcodi@Unison6.rmit.oz ARPA: rcodi%Unison6.rmit.oz@seismo BITNET: rcodi%Unison6.rmit.oz@CSNET-RELAY VOICE: (03) 660-2619, 1pm-11:59pm weekdays PAPER: c/o Digital Systems and Computer Engineering, Dept of Communication & Electronic Engineering, Royal Melbourne Institute of Technology, Latrobe St, Melbourne, 3000, Australia ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
kre@munnari.OZ (Robert Elz) (04/05/86)
In article <63@man.cs.uxuk.ac.>, neil@uk.ac.man.cs.ux (Neil Todd) writes: > What DOES really bug me is that only Britain and Portugal use what > Unix calls WET (Western European Time). Why, oh why can't they just > let us use GMT and BST (British Summer Time). I'm pretty sure that > there are more sites in Britain than in Portugal. I asked UCB > but was met with a deafening silence. Sorry about that - we were led to believe that the UK had joined the EEC and had given up some of its local foibles. (4.2's ctime is largely my fault). However, all is not lost, while not many people are aware of it, 4.2 allows you to have almost anything you like as your timezone name, just put TZNAME=GMT,BST in your environment and your wish is fulfilled. The parenthetical comment about 4.2 ctime being my fault above really means that - it is clearly not adequate. It's true that its better than V7 or SysV, but its not good enough. Unfortunately, its not going to be fixed in 4.3, but you can be sure that 4.4bsd (should there ever be such an animal) will have something based on Arthur Olson's code (posted to mod.sources after a lot of discussion in mod.std.unix - you people do read those groups, surely?) the precise form will depend on what P1003 finally decide. Robert Elz {ukc,mcvax,seismo}!munnari!kre
levy@ttrdc.UUCP (Daniel R. Levy) (04/10/86)
In article <204@Unison6.OZ>, rcodi@Unison6.UUCP writes: >I rekon that the BSD way of keeping the timezone info in the kernel is more >sensible, as it guarantees uniformity for all processes in the system. Perhaps >a cron script particular to each machines' timezone can be used to alter >DST at appropriate times of the year for those countries that seem >to keep changing DST (by adb'ing the kernel? - Yuk!) > Ian Donaldson Why adb the kernel? A privileged system call would do. Of course a program which used the system call to set the time zone details would have to be invoked every time the machine was rebooted, but that's easy. And why use a cron script? Deep internally the machine would know GMT (say), but would actually perform transactions in terms of the local time as figured by a table implanted in the kernel via the aforementioned system call. The default (prior to system call) could be something reasonable based on data furnished when the kernel was made. Surely this has been suggested before? -- ------------------------------- Disclaimer: The views contained herein are | dan levy | yvel nad | my own and are not at all those of my em- | an engihacker @ | ployer or the administrator of any computer | at&t computer systems division | upon which I may hack. | skokie, illinois | -------------------------------- Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa, vax135}!ttrdc!levy
peterc@ecr1.UUCP (Peter Curran) (04/11/86)
In addition to the problem of time zones not being multiples of an hour, I pointed out another difficulty in a previous discussion of this topic - "double daylight savings time." In this scheme, the clock is advanced one hour in the early spring, and then a second hour later on. I haven't been able to determine that this is being used anywhere in the world right now, but it has been used in the past - it was used in Britain during the second world war. Any "general mechanism" for handling daylight savings time better account for things like this, because who knows what the politicians will come up with. -- Peter Curran Emerald City Research, Ltd. ...utzoo!ecrhub!ecr1!peterc