I have a DateTime variable dt in trigger.Insert of a record which debug result is :
USER_DEBUG |DEBUG|2016-12-08 00:00:00
We can see that it's the start time 12:00 AM of date: Dec 8th 2016.
When i convert dt using DateTime.newInstance
DateTime.newInstance(dt.year(), dt.month(), dt.day(), 0, 0, 0);
The result i get is :
USER_DEBUG |DEBUG|2016-12-07 08:00:00
My SF org has timezone is
(GMT-08:00) Pacific Standard Time (America/Los_Angeles)
After convertion, dt is start time for the day before!! : Dec 7th 2016
Any one can help me, please?