public static void createAppointment(Appointment TemplateAppointment) {
        // look up key to keys and "insert" to make everything work; //To change body of generated methods, choose Tools | Templates.
        String sql = "INSERT INTO appointments Values(NULL, ?, ?,?,?,?,?,Now(),'',Now(),'',?,?,?)";
        // (Appointment_ID,Title,Description, Type, Phone, Division_ID) VALUES (5, '', 'test', '', 'test','')" ;
        try {
            PreparedStatement ps = DBConnection.getConnection().prepareStatement(sql);
            ps.setString(1, TemplateAppointment.getTitle());
            ps.setString(2, TemplateAppointment.getDescription());
            ps.setString(3, TemplateAppointment.getLocation());
            ps.setString(4, TemplateAppointment.getType());
            LocalDateTime start = LocalDateTime.of(TemplateAppointment.getDate(), TemplateAppointment.getStartTime());
            start = WashTimeZone(start, ZoneId.systemDefault(), ZoneId.of("UTC"));
            LocalDateTime end = LocalDateTime.of(TemplateAppointment.getDate(), TemplateAppointment.getEndTime());
            end = WashTimeZone(end, ZoneId.systemDefault(), ZoneId.of("UTC"));
            Timestamp Tstart = Timestamp.valueOf(start);
            Timestamp Tend = Timestamp.valueOf(end);
            ps.setTimestamp(5, Tstart);
            ps.setTimestamp(6, Tend);
//timezone work needs to happen here
            ps.setInt(7, TemplateAppointment.getCustomerid());
            ps.setInt(8, TemplateAppointment.getUserid());
            ps.setInt(9, TemplateAppointment.getContactid());
            ps.execute();
        } catch (SQLException ex) {
            ex.printStackTrace();
        }
    }
public static void createAppointment(Appointment TemplateAppointment) {
       
        String sql = "INSERT INTO appointments Values(NULL, ?, ?,?,?,?,?,Now(),'',Now(),'',?,?,?)";
       
        try {
            PreparedStatement ps = DBConnection.getConnection().prepareStatement(sql);
            ps.setString(1, TemplateAppointment.getTitle());
            ps.setString(2, TemplateAppointment.getDescription());
            ps.setString(3, TemplateAppointment.getLocation());
            ps.setString(4, TemplateAppointment.getType());
            LocalDateTime start = LocalDateTime.of(TemplateAppointment.getDate(), TemplateAppointment.getStartTime());
            start = WashTimeZone(start, ZoneId.systemDefault(), ZoneId.of("UTC"));
            LocalDateTime end = LocalDateTime.of(TemplateAppointment.getDate(), TemplateAppointment.getEndTime());
            end = WashTimeZone(end, ZoneId.systemDefault(), ZoneId.of("UTC"));
            Timestamp Tstart = Timestamp.valueOf(start);
            Timestamp Tend = Timestamp.valueOf(end);
            ps.setTimestamp(5, Tstart);
            ps.setTimestamp(6, Tend);
            ps.setInt(7, TemplateAppointment.getCustomerid());
            ps.setInt(8, TemplateAppointment.getUserid());
            ps.setInt(9, TemplateAppointment.getContactid());
            ps.execute();
        } catch (SQLException ex) {
            ex.printStackTrace();
        }
    }
public static void createappointment(appointment templateappointment) { string sql = "insert into appointments values(null, ?, ?,?,?,?,?,now(),'',now(),'',?,?,?)"; try { preparedstatement ps = dbconnection.getconnection().preparestatement(sql); ps.setstring(1, templateappointment.gettitle()); ps.setstring(2, templateappointment.getdescription()); ps.setstring(3, templateappointment.getlocation()); ps.setstring(4, templateappointment.gettype()); localdatetime start = localdatetime.of(templateappointment.getdate(), templateappointment.getstarttime()); start = washtimezone(start, zoneid.systemdefault(), zoneid.of("utc")); localdatetime end = localdatetime.of(templateappointment.getdate(), templateappointment.getendtime()); end = washtimezone(end, zoneid.systemdefault(), zoneid.of("utc")); timestamp tstart = timestamp.valueof(start); timestamp tend = timestamp.valueof(end); ps.settimestamp(5, tstart); ps.settimestamp(6, tend); ps.setint(7, templateappointment.getcustomerid()); ps.setint(8, templateappointment.getuserid()); ps.setint(9, templateappointment.getcontactid()); ps.execute(); } catch (sqlexception ex) { ex.printstacktrace(); } }