+ Start a Discussion
beta3betabeta3beta 

Ajax Dates

Hi,
 
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();
   dt.set("Fecha_Solicitud_Viabilidad__c",currentTime);
 
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?
beta3betabeta3beta

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

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

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

hi,

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.

SteveBowerSteveBower
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.