// look up key to keys and "insert" to make everything work; //To change body of generated methods, choose Tools | Templates.
public static void updateAppointments(Appointment PlaceholderAppointment) {
        // look up key to keys and "insert" to make everything work; //To change body of generated methods, choose Tools | Templates.
        String sql = "UPDATE appointments SET Title =?,  Description=?,   Location=?,  Type=?,  start=?, end=?,   Customer_ID=?,  User_ID=?, Contact_ID=? WHERE Appointment_ID = ?";
        try {
            PreparedStatement ps = DBConnection.getConnection().prepareStatement(sql);
            ps.setString(1, PlaceholderAppointment.getTitle());
            ps.setString(2, PlaceholderAppointment.getDescription());
            ps.setString(3, PlaceholderAppointment.getLocation());
            ps.setString(4, PlaceholderAppointment.getType());
            LocalDateTime start = LocalDateTime.of(PlaceholderAppointment.getDate(), PlaceholderAppointment.getStartTime());
            start = WashTimeZone(start, ZoneId.systemDefault(), ZoneId.of("UTC"));
            LocalDateTime end = LocalDateTime.of(PlaceholderAppointment.getDate(), PlaceholderAppointment.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, PlaceholderAppointment.getCustomerid());
            ps.setInt(8, PlaceholderAppointment.getUserid());
            ps.setInt(9, PlaceholderAppointment.getContactid());
            ps.setInt(10, PlaceholderAppointment.getAppointment_ID());
            ps.execute();
        } catch (SQLException ex) {
            ex.printStackTrace();
        }
    }
public static void updateAppointments(Appointment PlaceholderAppointment) {
// look up key to keys and "insert" to make everything work; //To change body of generated methods, choose Tools | Templates.
String sql = "UPDATE appointments SET Title =?, Description=?, Location=?, Type=?, start=?, end=?, Customer_ID=?, User_ID=?, Contact_ID=? WHERE Appointment_ID = ?";
try {
public static void updateAppointments(Appointment PlaceholderAppointment) {
// look up key to keys and "insert" to make everything work; //To change body of generated methods, choose Tools | Templates.
String sql = "UPDATE appointments SET Title =?, Description=?, Location=?, Type=?, start=?, end=?, Customer_ID=?, User_ID=?, Contact_ID=? WHERE Appointment_ID = ?";
try {
PreparedStatement ps = DBConnection.getConnection().prepareStatement(sql);
ps.setString(1, PlaceholderAppointment.getTitle());
ps.setString(2, PlaceholderAppointment.getDescription());
ps.setString(3, PlaceholderAppointment.getLocation());
ps.setString(4, PlaceholderAppointment.getType());
LocalDateTime start = LocalDateTime.of(PlaceholderAppointment.getDate(), PlaceholderAppointment.getStartTime());
start = WashTimeZone(start, ZoneId.systemDefault(), ZoneId.of("UTC"));
LocalDateTime end = LocalDateTime.of(PlaceholderAppointment.getDate(), PlaceholderAppointment.getEndTime());
public static void updateAppointments(Appointment PlaceholderAppointment) {
// look up key to keys and "insert" to make everything work; //To change body of generated methods, choose Tools | Templates.
String sql = "UPDATE appointments SET Title =?, Description=?, Location=?, Type=?, start=?, end=?, Customer_ID=?, User_ID=?, Contact_ID=? WHERE Appointment_ID = ?";
try {
PreparedStatement ps = DBConnection.getConnection().prepareStatement(sql);
ps.setString(1, PlaceholderAppointment.getTitle());
ps.setString(2, PlaceholderAppointment.getDescription());
ps.setString(3, PlaceholderAppointment.getLocation());
ps.setString(4, PlaceholderAppointment.getType());
LocalDateTime start = LocalDateTime.of(PlaceholderAppointment.getDate(), PlaceholderAppointment.getStartTime());
start = WashTimeZone(start, ZoneId.systemDefault(), ZoneId.of("UTC"));
LocalDateTime end = LocalDateTime.of(PlaceholderAppointment.getDate(), PlaceholderAppointment.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, PlaceholderAppointment.getCustomerid());
ps.setInt(8, PlaceholderAppointment.getUserid());
ps.setInt(9, PlaceholderAppointment.getContactid());
ps.setInt(10, PlaceholderAppointment.getAppointment_ID());