You need to sign in to do that
Don't have an account?
satish wagh
Event startDateTime shows more timestamp on Production
I have assigned custom timestamp to "starDateTime" standard field of event object by concatenating to custom date field but it shows additional 5:30 hours on Production.It works better in sandbox. I have following peace of code:
Above code gives right time in Start 9:00 and End 9:30 in event record but in production it shows 2:30 to 3:00. Please suggest any solution.Thanks!
String selectedTime='09:00 to 09:30'
string selectedDate='2019/10/1 00:00:00';
event.DurationInMinutes=30;
string conTime = selectedTime.substring(0,5);
string conDate = selectedDate.substring(0,10);
selectedDate =selectedDate+' '+conTime+':00';
Datetime convertedDate = Datetime.valueOf(selectedDate);
event.Time_Slot__c=selectedTime;
event.StartDateTime= convertedDate;
insert event;
string selectedDate='2019/10/1 00:00:00';
event.DurationInMinutes=30;
string conTime = selectedTime.substring(0,5);
string conDate = selectedDate.substring(0,10);
selectedDate =selectedDate+' '+conTime+':00';
Datetime convertedDate = Datetime.valueOf(selectedDate);
event.Time_Slot__c=selectedTime;
event.StartDateTime= convertedDate;
insert event;
Above code gives right time in Start 9:00 and End 9:30 in event record but in production it shows 2:30 to 3:00. Please suggest any solution.Thanks!