home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.msdos.programmer
- From: malcolm@muir.demon.co.uk ("Malcolm S. Muir")
- 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
- Subject: Re: BC++ time related Global Variables - need Help
- Distribution: world
- References: <BxsAGt.4CG@news.cso.uiuc.edu>
- Organization: Muir
- Reply-To: malcolm@muir.demon.co.uk
- X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.18)
- Lines: 43
- Date: Tue, 17 Nov 1992 11:34:42 +0000
- Message-ID: <722000082snz@muir.demon.co.uk>
- Sender: usenet@gate.demon.co.uk
-
-
- In article <BxsAGt.4CG@news.cso.uiuc.edu> macg9505@uxa.cso.uiuc.edu writes:
-
- >
- >
- > This is probably too simply for you C/C++ gurus out there, but how does
- >one set the global variables for timezone and day light savings in BC++?
- >The following doesn't work:
- ..
- >No matter what value is entered for timezone, the gmt value doesn't change.
- >Since the gmt is a function of localtime, timezone, and daylight, it should
- >change. If the above code (with appropriate #includes) is run, the gmt
- >computed is the same regardless of the value timezone is set to, or the value
- >of daylight. Using the tzset alternative has little value as well:
- ..
- >I've yet to get the gmt, or any other time function to respond differently by
- >any setting of the "TZ" variable, save for the middle number. So if someone
- >could please explain, either what I'm doing wrong,( I'd like to have the user
- >enter the difference between gmt and local time, and whether daylight savings
- >is in effect, and set the appropriate values myself), or confirm something is
- >amiss, I would be greatly indebted. I wouldn't even complain if Borland
- >responded, since I've already spent 90 min. on hold over the last week and
- >have given up on tech support. Post or email to macg9505@uxa.cso.uiuc.edu
-
- The Borland time functions are a disaster. The USA daylight savings dates
- are hard coded into the library and the daylight saving part of tz is ignored.
-
- If you live in an area that uses dates *other than* USA dates for the start
- and end of daylight savings you are up the proverbial creek.
-
- Also if you do not specify a timezone the library assumes you are set to
- GMT and deducts 6 hours, If you specify tz=GMT it makes the same (-6 hours)
- assumption. tz=GMT0 is required and treat the same as tz=GMT0BST if the
- date specifies a date when daylight savings are not in effect in USA.
-
- At least Microsoft get this one correct.
-
- --
- =============================================================================
- Malcolm S. Muir EMAIL: malcolm@muir.demon.co.uk
- Sunderland CIX: mmuir BIX: mmuir
- England CSERVE: 100012,31
- ======================= PGP 2.0 Public Key Available ========================
-