function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
p1 force developerp1 force developer 

Current Datetime value in local time zone.

 how to get the current datetime value in local time zone.

 

I tried system.now() but it returns the value in GMT

 

Thanks

 

ngabraningabrani

The issue has been discussed before. Take a lool at the following discussion for a solution to this problem -

 

http://boards.developerforce.com/t5/Apex-Code-Development/Is-there-any-way-to-get-current-date-and-time-as-per-the-logged/m-p/89746