private void parseTimeZone ( ParsedScheduleExpression parsedExpr , String string ) { if ( parsedExpr . timeZone == null ) // d639610 { if ( string == null ) { parsedExpr . timeZone = TimeZone . getDefault ( ) ; // d639610 } else { parsedExpr . timeZone = TimeZone . getTimeZone ( string . trim ( ) ) ; // d664511 // If an invalid time zone is specified, getTimeZone will always // return a TimeZone with an ID of "GMT". Do not allow this unless it // was specifically requested. if ( parsedExpr . timeZone . getID ( ) . equals ( "GMT" ) && ! string . equalsIgnoreCase ( "GMT" ) ) { throw new ScheduleExpressionParserException ( ScheduleExpressionParserException . Error . VALUE , "timezone" , string ) ; // F743-506 } } } }
Parses the time zone ID and stores the result in parsedExpr . If the parsed schedule already has a time zone then it is kept . If the time zone ID is null then the default time zone is used .