You need to sign in to do that
Don't have an account?
Rafael Martins Dos Santos
lightning component ui-DateTime - How corret the time zone
Hi,
I added a field ui:inputDateTime in my lightning component but when I select the time, I have as value the different time zone.
I Want convert this time to my time zone (Brasil).
Can someone help me to fix this?
Rafael.
I added a field ui:inputDateTime in my lightning component but when I select the time, I have as value the different time zone.
I Want convert this time to my time zone (Brasil).
Can someone help me to fix this?
Rafael.
Please go through the below link.
https://developer.salesforce.com/docs/component-library/bundle/ui:inputDateTime/example
Let me know if it helps .
Cheers,
Rabindranath
The $Locale global value provider returns information about the current user’s preferred locale. You can try using $locale.timezone in Aura to get the time zone and perhaps use it along with new Date to get the Date similar to the current loggged in user's timezone.
Refer this link
https://salesforce.stackexchange.com/questions/175573/how-to-get-current-date-as-per-logged-in-user-in-lightning-component
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/expr_locale_value_provider.htm
https://developer.salesforce.com/forums/?id=906F00000008zv0IAA
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_l10n.htm
Raj Vakati, Do you have some example of how to use this !$Locale.timezone.
Because I want get the time value from a field and convert to my current time zone.
All the exemple that I found just tell how to get the current time, and not the value from a field.