You need to sign in to do that
Don't have an account?
Server TimeStamp
Hi community,
I have created an e-commerce app in which visitors leave information on a form, when they fill the information on the form this creates an object in force.com database. The object foes under the name of the "Site guest user" due that I have the app in a site.
After they leave a message on the form, the controller sets the date in the description field:
n_cot.DescripcionCotizacion__c ='Compra de prueba dev @: ' + Datetime.now() + txt;
If I look at the object, the created date is ok, but the date in the description field (generated by the snippet code above), it is wrong, it is about 6 hours ahead.
I have changed the date and time in:
-Site Guest User Profile and user
-Admin user
-Company profile
Still no change. I am missing something? or this is something related due that I am still in Sandbox? any help appreciated. Thanks!
Hi
I think the time dipsplayed in the Description field is in the GMT timezone, if you want the time captured in the User's time zone then you must use the format instance method.Something like this:
the date in he myDate variable will be in User's timezone.
Hope this helps!!
Regards
Sam