2

Date.today() returns the datetime for the current users timezone (ref: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_date.htm). How do I make it return a date information in UTC format?

Thanks

2
3

You can use

System.debug(Datetime.now().dateGMT());

which would return the Date in the GMT Timezone

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.