SBM ModScript Reference → Programming SBM ModScript → Object Types → TimeZone → TimeZone CreateUserTimeZone() Global Method
Returns the current user's TimeZone.
Parameter | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
TimeZone |
A TimeZone object based on the user's preferred time zone. |
SBM ModScript version: 11.3.
var tz = CreateUserTimeZone(); // result assumes user has MST time zone var loc = CreateLocale("en_US"); var t = TimeT(1517620926); Ext.WriteStream( t.FormatDateText("yyyy-MM-dd hh:mm:ss a", tz, loc ) );
Result:
2018-02-02 06:22:06 PM
This method creates a TimeZone object using the user's time zone. The TimeZone will change depending on who is logged in because the specified time zone depends on the user.
Copyright © 2007–2018 Serena Software, Inc., a Micro Focus company. All rights reserved.