Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Tue, 10 Feb 2004 14:32:48 +1100 (EST) From: King Lung Chiu To: Cygwin Mailing List Subject: definition of 'timezone' Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi, I'm trying to port some code that uses 'timezone' from time.h: ... time_t utime; struct tm tms; ... utime = utime - timezone + tms.tm_isdst*3600; ... but I get compilation error because the code expects timezone to be a long (as is on Linux) but in cygwin it's actually a function that returns a char*: ../../src/client/store_in_cc.c: In function `utc2unix': ../../src/client/store_in_cc.c:135: error: invalid operands to binary - if I print the result of timezone(), I get: GMT+10:00 ie. a string rather than a number. Is there a standard way to convert cygwin's 'timezone' to the number expected by the Linux code? regards King Lung Chiu -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/