code: func saveTimeContext(db *sqlx.DB, in *dt.Msg) error {
  	if len(in.StructuredInput.Times) == 0 {
  		return nil
  	}
  	byt, err := json.Marshal(in.StructuredInput.Times)
  	if err != nil {
  		return err
  	}
  	if in.User.ID > 0 {
  		q := `INSERT INTO states (key, value, userid, pluginname)
  		      VALUES ($1, $2, $3, '')
  		      ON CONFLICT (userid, pluginname, key)
  		      DO UPDATE SET value=$2`
  		_, err = db.Exec(q, keyContextTime, byt, in.User.ID)
  	} else {
  		q := `INSERT INTO states
  		      (key, value, flexid, flexidtype, pluginname)
  		      VALUES ($1, $2, $3, $4, '')
  		      ON CONFLICT (flexid, flexidtype, pluginname, key)
  		      DO UPDATE SET value=$2`
  		_, err = db.Exec(q, keyContextTime, byt, in.User.FlexID,
  			in.User.FlexIDType)
  	}
  	if err != nil {
  		return err
  	}
  	return nil
  }
docs: // saveTimeContext records contextual information about the time being
  // discussed, enabling Abot to replace things like "then" with the time it
  // should represent.