;+
; NAME:
;	vu_set_time_entry
; PURPOSE:
;	Only for internal use by href=vu_header=
; CALLING SEQUENCE:
	FUNCTION vu_set_time_entry, hdr_str, str, offset
; INCLUDE:
	@compile_opt.pro			; On error, return to caller
; CALLS:
;	flt_string, vu_check, Carrington, TimeSet, IsTime
; MODIFICATION HISTORY:
;	OCT-2005, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
;	    Extracted from vu_header.
;-

cst = strcompress(strmid(hdr_str,strlen(str)), /rem)

CASE vu_check(cst, time, prefixlen=0, offset=offset, /silent) OF
0: BEGIN
	time = flt_string(cst, numfmt=numfmt, lencrumbs=lencrumbs)

	CASE numfmt EQ 1 AND lencrumbs EQ 0 OF
	1: time = Carrington(offset+time)
	0: time = TimeSet(cst)
	ENDCASE
END
1: time = Carrington(time)
ENDCASE

IF NOT IsTime(time) THEN message, 'invalid time: '+cst

RETURN, time  &  END
