Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public without sharing class timeZonetEst {
- Public Static void Method(){
- Account acc=[select id,CreatedDate from Account limit 1];
- Datetime dTime = acc.CreatedDate;
- system.debug(dTime);
- Integer offset = UserInfo.getTimezone().getOffset(dTime);
- Datetime local = dTime.addSeconds(offset/1000);
- system.debug(local);
- }
- }
Add Comment
Please, Sign In to add comment