Hello everyone,

 

First of all, sorry for the terrible English I will do my best, also I don't
have much programming knowledge only some PHP.

 

I am having issues with a software that I run on my FreeBSD server
(6.2-RELEASE). Here is a simple demonstration of the problem:

 

This code:

 

// CODE START

#include <stdio.h>

#include <time.h>

 

int main() {

        extern long timezone1;

 

        tzset();

 

        printf("timezone is %d\n", timezone);

        printf("tzname[0] is %s\n", tzname[0]);

        printf("tzname[1] is %s\n", tzname[1]);

        return 0;

}

// CODE END

 

 

Give this result:

 

timezone is 134513672

tzname[0] is EST

tzname[1] is EDT

 

 

The value of "timezone" should be "14400" which is the difference between my
timezone (EDT) and UTC in seconds. This problem only appeared when we went
from EST to EDT (daylight saving time) on march 9th. Anyone knows why I am
getting "134513672" ?

 

Here is some more information about my system:

 

# date

Sat Mar 22 15:24:42 EDT 2008

# date -u

Sat Mar 22 19:24:45 UTC 2008

# gcc -v

Using built-in specs.

Configured with: FreeBSD/i386 system compiler Thread model: posix gcc
version 3.4.6 [FreeBSD] 20060305

# uname -a

FreeBSD 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 UTC 2007
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP  i386

 

 

Thank for the help!

 

-fred

 

 

 

 

 

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to