;+ ; NAME: ; SECHHMMSS ; PURPOSE: ; To convert a time in HHMMSS format to seconds after midnight. ; CATEGORY: ; Time routines. ; CALLING SEQUENCE: ; sec = SECHHMMSS( HHMMSS ) ; INPUTS: ; HHMMSS: The time (UT or local standard time) expressed as ; HHMMSS where HH are the two hour digits, MM are ; the two minutes digits, and SS are the two seconds ; digits. ; OPTIONAL INPUTS: ; None. ; KEYWORD PARAMETERS: ; None. ; OUTPUTS: ; The time in (integer) seconds since midnight. ; OPTIONAL OUTPUTS: ; None. ; COMMON BLOCKS: ; None. ; SIDE EFFECTS: ; None. ; RESTRICTIONS: ; Fractional seconds and negative times cannot be handled. ; PROCEDURE: ; Straightforward. ; EXAMPLE: ; sec = SECHHMMSS( 010203 ) ; PRINT, sec ; 3723 ; SEE ALSO: ; SECHMS (in the JHU/APL library) takes seconds after midnight ; and returns three values giving HH, MM, and SS. ; MODIFICATION HISTORY: ; Written by: In antiquity. ; Documented by: DPS, ISR, 950626. ;- FUNCTION sechhmmss,hms,debug=debug hmsl=ROUND(hms) h=hmsl/10000L m=(hmsl-10000L*h)/100L s=hmsl-10000L*h-100L*m IF KEYWORD_SET(debug) THEN HELP,h,m,s RETURN,(h*60L+m)*60L+s END