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

Re: what happened to time/date functions?




As David remarked, they disappeared in IDL 5.2 because of Y2K
compliance issues, mostly having to do with ENVI, as I recall. A
*very* small issue, as you'll see below. I had something of a
knockdown-dragout with them over this, since I use these *all* the
time and I have *no* problems with them (because I always use 4 digits
for my years!)

You can retreive the old files from idl 5.2 release CD (in
rsi/idl52/lib/compat) or just get them from the the /lib directory in
5.1 distrib CD. If you don't have those, contact me and I'll put them
on an ftp site for you.

When I talked to them about this, they sent me a revised version of
str_to_dt.pro that fixed the only y2k compliance issue they mentioned
specifically. The output from 'diff' for these two versions (diff new
old) is:

71,78c71
<  
< CATCH, onerror
<  
< if onerror NE 0 then begin
<     print, !error_state.msg
<     return,0
< endif
<  
---
> 
133,138c126,128
<  
<         if year eq 0 then begin
<             message,'There is no year 0.'
<             return,0
<         endif
<  
---
> 
>         if year lt 100 then year = year + 1900 ;Not Y2K compatible!!!
> 

As you can see, the old version defaults 2 digit years to 1900 + year,
which they disallow in the new version. This is the only explicitly
mentioned y2k problem, although they've hinted at others. I asked
about these, but never got a response. I've had no problem with these
routines, they are the general way I represent time in all my
production code and have been since 1997, and I've been running a
this system 24/7 since then. It ran quite happily over the
change. My perl code broke, but not the IDL code.


William


Mirko Vukovic <mvukovic@taz.telusa.com> writes:

> Hi,
> 
> I'm runing idl 5.3.1 on windows nt, and cannot access
> the time and date functions introduced in 5.1.
> 
> Am I on the correct planet, or have I missed something?.
> (my newsgroup searcher is not functioning at the moment)
> 
> Thanks,
> 
> Mirko
> 
> 
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.

-- 
Ab hoc possum videre domum tuum.
Public Key: http://home.earthlink.net/~whdaffer/#PGP-public-key