Bulletin number: 52 Products affected: D700E D705B Description: Time zones and so.time Component: hostio Date: Wed Apr 26 16:44:37 BST 1990 ----- The documentation on the routine so.time in the hostio library is not complete for D700E and D705B. The iserver is written in Microsoft C. To get the current time the Microsoft routine time is called. The return from this routine depends on the value of an environment variable called TZ. The variable is made up of three fields: A three character name for your time zone A (possibly) signed integer Possibly a Summer time name The (possibly) signed integer should be the number of hours West of Greenwich. Central Europe for example is -1 hours West of GMT. If Summer time (or Daylight Saving Time) is in use in your area add the third parameter. During the Summer months the times will be corrected to account for the hours difference. Double Summer Time is not accounted for (no more wars I guess!). So example time. For a country East of Greenwich which is 3 hours ahead of GMT, whose Winter time is called ZBT and Summer time is called ZDT: > SET TZ=ZBT-3ZDT If the TZ variable is missing it defaults to PST8PDT i.e. Pacific Daylight saving Time or 8 hours West of Greenwich. There is still a problem. The algorithm to decide when Summer time is in effect is probably correct for MicroSoft's headquarters, but not for Europe and most other places. One way to correct for this is to manually change your TZ variable twice a year. In both cases leave out the name of the Summer time zone. So: In Winter > SET TZ=ZBT-3 In Summer > SET TZ=ZBT-4 This way the library will make no allowances for Summer time. The other way to correct this is to change the iserver and recompile it. The ftime routine is more suitable for use in this case. The code concerned is in the routine SpTime in the module hostc.c. If the following two lines time( &UTCTime ); Time = UTCTime - timezone; are replaced by the following { #include struct timeb tb; ftime( &tb ); UTCTime = tb.time; Time = UTCTime - tb.timezone * 60L; if (tb.dstflag != 0) Time += 3600; } the problem goes away and the TZ variable can be used correctly. Credit for this one is mine, I suppose I have to take credit for something. Sigh!