comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: sec_to_dt has gone missing!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: sec_to_dt has gone missing! [message #13236 is a reply to message #13235] Fri, 30 October 1998 00:00 Go to previous messageGo to previous message
Kevin Ivory is currently offline  Kevin Ivory
Messages: 71
Registered: January 1997
Member
>> Nigel Wade (nmw@ion.le.ac.uk) writes:
>>> In the documentation for IDL 5.1 the function SEC_TO_DT is mentioned.
>>> When I try to use it, it doesn't exist.
>>
> David Fanning wrote:
>> Mine works:
David Foster wrote:
> Mine is broken:

It is complete and working in IDL 5.1.1 for Linux, so I'll simply attach
a copy of the file (the code is only a few lines) to the end of this
message.

Kevin
--
Kevin Ivory Tel: +49 5556 979 434
Max-Planck-Institut fuer Aeronomie Fax: +49 5556 979 240
Max-Planck-Str. 2 mailto:Kevin.Ivory@linmpi.mpg.de
D-37191 Katlenburg-Lindau, GERMANY http://www.gwdg.de/~kivory2/
------------- cut here -------------------------------------------------
;$Id: sec_to_dt.pro,v 1.1 1998/04/27 22:08:38 slett Exp $
;
; Copyright (c) 1997-1998, Research Systems, Inc. All rights reserved.
; Unauthorized reproduction prohibited.
FUNCTION SEC_TO_DT, seconds, Base=base, Date_fmt=date_fmt
;+
; NAME:
; SEC_TO_DT
;
;
; PURPOSE:
; Convert time from seconds-since-base to an IDLDT structure
;
;
; CATEGORY:
; MISC
;
;
; CALLING SEQUENCE:
; result = SEC_TO_DT( seconds)
;
;
; INPUTS:
; seconds: a floating point scalar, giving the number of seconds
; elapsed from the base date.
;
;
; OPTIONAL INPUTS:
;
;
;
; KEYWORD PARAMETERS:
; BASE: A keyword in string format (see STR_TO_DT), giving the
; base date. The default value is calculated from !DT_BASE.
; (Please see IDLDT__DEFINE for a description of !DT_BASE)
;
; Date_Fmt: An integer indicating the format of the BASE keyword.
; (Please see STR_TO_DT for an explanation of Date_Fmt)
; OUTPUTS:
; Returns an IDLDT structure with the date corresponding to
; the base date plus the seconds parameter.
;
;
; OPTIONAL OUTPUTS:
;
;
;
; COMMON BLOCKS:
;
;
;
; SIDE EFFECTS:
;
;
;
; RESTRICTIONS:
;
;
;
; PROCEDURE:
;
;
;
; EXAMPLE:
; PRINT, SEC_TO_DT( 245004.0)
;
;
; MODIFICATION HISTORY:
;
;-

tmp = {idldt}

IF keyword_set( base ) THEN BEGIN
ret_val = STR_TO_DT( base, Date_fmt=date_fmt )
ENDIF ELSE BEGIN
ret_val = !dt_base
ENDELSE

ret_val = DT_ADD( ret_val, second = seconds)

RETURN, ret_val
END
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: a possible replacement for cw_animate and xinteranimate
Next Topic: Q: HOw to include a text file in HDF format? (using IDL)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 03:37:15 PDT 2025

Total time taken to generate the page: 0.80232 seconds