cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Get the Time Zone for Extended UI

jw614h
7-Bedrock

Get the Time Zone for Extended UI

Does anyone know how I can send the timezone for the user to a custom object?

I need the part in red:

SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss a z");

formatter.setTimeZone(TimeZone.getTimeZone("America/New_York"));

Thanks

Jay

2 REPLIES 2
cdovholuk
12-Amethyst
(To:jw614h)

I assume you're talking javascript from a browser pushed up to Scripto. I'm not javascript expert but there really doesn't seem to be a good way to do that.

You can get the timezone offset from javascript but that works in hours offset from GMT so it's not perfect. If the user is a user on our platform - you could find the user in the custom object and get the timzeone preference they have set in the platform maybe?


userBridge.find("clint").timezoneId


hope that helps...     

that should work,

Thanks

Jay

Announcements


Top Tags