You need to sign in to do that
Don't have an account?
Eager-2-Learn
SF Server Time
Hi,
I have a strange thing going on. When I am on CS13 (Sandbox) and I perform a System.debug(System.Now()); it returns a time of 20:42 (8:42pm) and the actual time here is 4:42pm! If my ORG is setup to be on the New York East Coast then why wouldn't the Sytem.Now() command return the correct time?
I am using this javascript with a hard coded expected date/time and it is throwing my results off and the above is why I think it is.
System.now() returns a date/time in GMT, not your local timezone.
Please see the link below for further description.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_system.htm
Thanks for your support.
How can I get this java script line to pull the Eastern New Time.
present = new Date();
present = present.getTime() + (60000) + (12 * 60 * 60 * 1000);
It looks like when I am all done with the comparison of the 'present' value and the finish date I am 12 hours difference. My fix is to adjust by 12 hours and I made comment in the code so everyone else knows but I would prefer to make it work properly.
The entire code is here--NOTE: I did not write this and cannot take credit.