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

Re: IDL Time Zones?



Craig Markwardt wrote:
> 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

I get the same behavior in Linux:

IDL> print,!version & print,systime(0) & spawn,'date'
{ x86 linux unix 5.1 Apr 13 1998}
Mon Mar 29 20:00:05 1999
Mon Mar 29 14:00:06 CST 1999

All my other platforms look ok:

IDL> print,!version & print,systime(0) & spawn,'date'
{ mipseb IRIX unix 5.2 Oct 30 1998}
Mon Mar 29 13:58:42 1999
Mon Mar 29 13:58:42 CST 1999

IDL> print,!version & print,systime(0) & spawn,'date'
{ sparc sunos unix 5.2 Oct 30 1998}
Mon Mar 29 14:00:14 1999
Mon Mar 29 14:00:14 CST 1999

IDL> print,!version & print,systime(0) & spawn,'date'
{ mipseb IRIX unix 5.1 Apr 13 1998}
Mon Mar 29 14:00:52 1999
Mon Mar 29 14:00:52 CST 1999

---
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley