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

Ajax Dates

I'm trying to create a new object. Here's part of my code:
   var dt    = new DynaBean("Descripcion_Tecnica__c");
   var currentTime = new Date();
However, sometimes the newly created object is set back one calendar day. For example, if i create the object today the field Fecha_Solicitud_Viabilidad__c will have the value 20/06/2006 4:02 PM instead of 21/06/2006 4:02 PM
can someone help me with this?

Hi, I forgot to mention that i'm using beta2 version

If you alert the date particulars before they're submitted, what does it return?

ie... alert(currentTime.getDate())


before they're submitted it returns the actual date. but after i have created the object, it returns one day behind the actual date. It happens sometimes, not every time.

Might it have something to do with the Timezone?  Is the userTimeZone from the GetUserInfo the same timezone as the one where you are running your Javascript?

Just thinking out loud...  Steve.