[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IDL Time Zones?




It seems that the SYSTIME() function doesn't work always under IDL.
SYSTIME(0) is supposed to print the *local* time, but it doesn't under
my Linux system.  Here are two examples.

CORRECT EXAMPLE:
IDL> print, !version & print, systime(0) & spawn, 'date'
{ alpha OSF unix 5.2 Oct 30 1998}
Sun Mar 28 17:58:13 1999
Sun Mar 28 17:58:14 EST 1999      ;; <----- OK, the times match here

INCORRECT EXAMPLE:
IDL> print, !version & print, systime(0) & spawn, 'date'
{ x86 linux unix 5.1 Apr 13 1998}
Mon Mar 29 02:15:11 1999          ;; <----- NO, this is GMT, not local!!!
Sun Mar 28 21:15:11 EST 1999

Clearly the system time zone is set correctly, because "date" gets it
right (and the TZ environment variable has no effect).

I would be interested in seeing if other systems have this error.  I
couldn't find this on the RSI web page.  Is it documented anywhere?

Craig


-- 
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D.         EMAIL: craigmnet@astrog.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------