i am creating a project in angular and spring boot.
upon a certain event i send a date type object (called start time) from angular to spring boot which is written is in java i am facing 2 problems:
when i send the startTime from angular it is sent in indian standard time. but when i receive the start time in the back-end it is stored in utc format so there is -5.30 time difference
when i bring back the startTime at time of login (from back-end) i can display it in form of console.log(startTime) but when i do startTime.getHours(),startTime.getMinutes() etc. it shows an error that the getHours() is not a function of startTime
guys can anyone help me with both of the problem..
here is my scheduleData.ts which has startTime
export class scheduleData {
public StartTime: Date;
public EndTime: Date;
}
now here is my java code
public class ScheduleDataModel {
public LocalDateTime StartTime;
public LocalDateTime EndTime;
}