home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / msdos / programm / 10727 < prev    next >
Encoding:
Text File  |  1992-11-17  |  2.8 KB  |  58 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. From: malcolm@muir.demon.co.uk ("Malcolm S. Muir")
  3. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!cs.utexas.edu!hermes.chpc.utexas.edu!news.utdallas.edu!corpgate!bnrgate!bnr.co.uk!pipex!demon!muir.demon.co.uk!malcolm
  4. Subject: Re: BC++ time related Global Variables - need Help 
  5. Distribution: world
  6. References: <BxsAGt.4CG@news.cso.uiuc.edu>
  7. Organization: Muir
  8. Reply-To: malcolm@muir.demon.co.uk
  9. X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.18)
  10. Lines: 43
  11. Date: Tue, 17 Nov 1992 11:34:42 +0000
  12. Message-ID: <722000082snz@muir.demon.co.uk>
  13. Sender: usenet@gate.demon.co.uk
  14.  
  15.  
  16. In article <BxsAGt.4CG@news.cso.uiuc.edu> macg9505@uxa.cso.uiuc.edu writes:
  17.  
  18. >
  19. >      
  20. >      This is probably too simply for you C/C++ gurus out there, but how does
  21. >one set the global variables for timezone and day light savings in BC++?
  22. >The following doesn't work:
  23. ..
  24. >No matter what value is entered for timezone, the gmt value doesn't change. 
  25. >Since the gmt is a function of localtime, timezone, and daylight, it should
  26. >change. If the above code (with appropriate #includes) is run, the gmt
  27. >computed is the same regardless of the value timezone is set to, or the value
  28. >of daylight.  Using the tzset alternative has little value as well:
  29. ..
  30. >I've yet to get the gmt, or any other time function to respond differently by
  31. >any setting of the "TZ" variable, save for the middle number.  So if someone
  32. >could please explain, either what I'm doing wrong,( I'd like to have the user
  33. >enter the difference between gmt and local time, and whether daylight savings
  34. >is in effect, and set the appropriate values myself), or confirm something is
  35. >amiss, I would be greatly indebted.  I wouldn't even complain if Borland
  36. >responded, since I've already spent 90 min. on hold over the last week and
  37. >have given up on tech support. Post or email to macg9505@uxa.cso.uiuc.edu 
  38.  
  39. The Borland time functions are a disaster. The USA daylight savings dates
  40. are hard coded into the library and the daylight saving part of tz is ignored.
  41.  
  42. If you live in an area that uses dates *other than* USA dates for the start
  43. and end of daylight savings you are up the proverbial creek. 
  44.  
  45. Also if you do not specify a timezone the library assumes you are set to
  46. GMT and deducts 6 hours, If you specify tz=GMT it makes the same (-6 hours)
  47. assumption. tz=GMT0 is required and treat the same as tz=GMT0BST if the
  48. date specifies a date when daylight savings are not in effect in USA.
  49.  
  50. At least Microsoft get this one correct.
  51.  
  52. -- 
  53. =============================================================================
  54. Malcolm S. Muir                              EMAIL: malcolm@muir.demon.co.uk
  55. Sunderland                                   CIX: mmuir BIX: mmuir
  56. England                                      CSERVE: 100012,31
  57. ======================= PGP 2.0 Public Key Available ========================
  58.