;+
; PROJECT
;               SolarB EIS
;
; NAME
;               EIS_UPDATE_TIMELINE_ENTRY
;
; CATEGORY
;               EIS planning
;
; PURPOSE
;               Function to update an "as-planned" database entry
;
; INPUTS
;               seq_id - the sequence_id of the entry
;               t      - a timeline entry time_component structure
;
; WRITTEN
;               John A Rainnie RAL Aug-2005
;
; VERSION
;               v0.1
;
;-
;************************************************************************
FUNCTION eis_update_timeline_entry , seq_id , t

IF (seq_id EQ 0) THEN BEGIN

    print,"Cripes - I'm trying to save a TL entry here with a seq_id"
    print,"         set to zero!"

ENDIF

DEFSYSV , '!PRIV', 2

; Open database for writing the new Study entry
status = eis_open_db(/TIME,/UPDATE)
;
; Update database entry with new values
dbput, 'TIME_TAGGED'  , t.time_tagged       , seq_id
dbput, 'FIVE_PC_RULE' , t.five_percent_rule , seq_id
dbput, 'START_TIME'   , t.start_time        , seq_id
dbput, 'STOP_TIME'    , t.end_time          , seq_id
; These other tags don't change
; 'DB_TABLE'      , 'SEQUENCE_ID'
; 'TIME_DURATION' , 'ENTRY_TYPE'


RETURN , 1

END
