Skip to main content
1-Visitor
October 8, 2014
Question

Get the Time Zone for Extended UI

  • October 8, 2014
  • 1 reply
  • 1536 views

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

    1 reply

    5-Regular Member
    October 8, 2014

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

    jw614h1-VisitorAuthor
    1-Visitor
    October 8, 2014

    that should work,

    Thanks

    Jay