zdump manipulates its environment directly but is otherwise the same code. Solaris and glibc define putenv slightly differently. There are two lines like
char buff[20]; in src/main/datetime.c, and if you change those to static char buff[200]; it should work (increasing the length as Linux timezones can be long). (Does for me on RH7.2.) On Thu, 6 Mar 2003 [EMAIL PROTECTED] wrote: > It's a Linux issue. Solaris gives: > > > Sys.time() > [1] "2003-03-06 08:27:23 GMT" > > as.POSIXlt(Sys.time(), "HST") > [1] "2003-03-05 22:27:40 HST" > > which looks right to me. Past experience suggests that Solaris's POSIX > conformance is much better than glibc's. Since my RH7.2 box does it too, > I will look for a workaround. (The problem seems to be in the use of > tzset, and the code of zdump may indicate how to get around this.) > > Brian > > On Thu, 6 Mar 2003, Adrian Trapletti wrote: > > > Can anybody give me a hint why as.POSIXlt doesn't recognize the same > > timezones that zdump knows about (Linux Suse 8.1 and Suse 7.3)? Is there > > a workaround? > > > > R : Copyright 2002, The R Development Core Team > > Version 1.6.1 (2002-11-01) > > > > R is free software and comes with ABSOLUTELY NO WARRANTY. > > You are welcome to redistribute it under certain conditions. > > Type `license()' or `licence()' for distribution details. > > > > R is a collaborative project with many contributors. > > Type `contributors()' for more information. > > > > Type `demo()' for some demos, `help()' for on-line help, or > > `help.start()' for a HTML browser interface to help. > > Type `q()' to quit R. > > > > [Previously saved workspace restored] > > > > > Sys.time() > > [1] "2003-03-06 08:20:09 CET" > > > system("zdump CET") > > CET Thu Mar 6 08:20:14 2003 CET > > > as.POSIXlt(Sys.time(), "HST") > > [1] "2003-03-06 08:20:18 CET" > > > system("zdump HST") > > HST Wed Mar 5 21:20:20 2003 HST > > > > best > > Adrian > > > > ______________________________________________ > > [EMAIL PROTECTED] mailing list > > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > > > > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help