Thanks for the suggestion Jon. I tried that change but there was no difference in behavior. I've completed a bit of debugging have traced the issue to the statement marked in red, this statement uses this.timezoneName which is set at the statement marked in green.
If I set this.timezoneName to "Pacific/Auckland" at the green statement there is no change in behavior
from => this.timezoneName = strTimezone
to => this.timezoneName = "Pacific/Auckland"
If I substitute "Pacific/Auckland" for this.timezoneName in the statement in red, again there is no change in behavior.
from => NL.session.setTimezone(this.timezoneName);
to => NL.session.setTimezone("Pacific/Auckland");
/** Set the working timezone
*
* @strTimezone
* special case : _server_, _login_, _inherit_
* _wdbc_ (only for report) : use timezone of the db server (WdbcTimeZone option)
* or the system one if not setted
*
**/
NL.WebForm.FormBase.prototype.setTimezone = function(strTimezone)
{
if( String(this.ctx.@_historyId) == "" )
{
if( strTimezone == "_wdbc_" )
{
this.timezoneName = getOption("WdbcTimeZone", true)
if( this.timezoneName == "" )
strTimezone = "_server_"
}
else if( strTimezone == "_inherit_" || strTimezone == "")
{ // default is login
strTimezone = "_login_"
}
if( strTimezone == "_server_" )
this.timezoneName = application.getServerTimezone()
else if( strTimezone == "_login_" )
this.timezoneName = String(this.ctx.userInfo.@timezone)
else if( strTimezone != "_wdbc_" )
this.timezoneName = strTimezone
this.ctx.timezone.@current = this.timezoneName
}
else
this.timezoneName = String(this.ctx.timezone.@current)
this.ctx.timezone.@changed = String(this.ctx.userInfo.@timezone) != this.timezoneName
if( this.timezoneName != "" )
NL.session.setTimezone(this.timezoneName);
return this.timezoneName
}
NL.WebForm.FormBase.prototype.resetTimezone = function()
{
if( String(this.ctx.userInfo.@timezone) != '' )
NL.session.setTimezone(this.ctx.userInfo.@timezone.toString());
}
NL.WebForm.FormBase.prototype.getTimezoneName = function()
{
return this.timezoneName
}