Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
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
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