Skip to content

OSDTimezone variable issue

Featured Replies

Hey Guys,

 

Might be a stretch but wondering if anyone here had any ideas.... I have a frontend hta built configured in the OSD Task Sequence which as part of it sets the variable OSDTimezone.

 

I basically have a dropdown box with a list of locations available to set the timezone.

 

My problem is that timezone names that have full stops don't set correctly and when the computer loads it has GMT time and not what was selected.

 

I am using the microsoft list: http://technet.microsoft.com/en-us/library/cc772783%28WS.10%29.aspx

 

An example is that if "New Zealand Standard Time" is selected it works fine however "A.U.S. Eastern Standard Time" does not.

 

Here is an example of the vbscript section of the code:

 

	If sTSLocation = "Auck" Then
	oTaskSequence("OSDTimeZone") = "New Zealand Standard Time"
	window.Close() 
End If

If sTSLocation = "Suns" Then
	oTaskSequence("OSDTimeZone") = "A.U.S. Eastern Standard Time"
	window.Close() 
End If

 

I have had this working before but I'll be damned if I can remember now. :)

 

I even put a msgbox in to ensure that it is picking up the rule correctly:

 

	If sTSLocation = "Dand" Then
	oTaskSequence("OSDTimeZone") = "A.U.S. Eastern Standard Time"
	msgbox "Dandenong Selected"
window.Close() 
End If

 

The msgbox displays however once the computer loads it is set to GMT time.

 

I also tried using the index number but that does not seem to work at all.

 

Any ideas?

 

Is there some way I can check what the variable is set to during the build process as that might give me some clue as to what is going on?

Since nobody has chimed in, I thought I'd ask... Have you tried using the numbers for the time zones instead of the names? So you'd use "255" instead of "A.U.S. Eastern Standard Time". I don't have to mess with time zones, so just tossing it out there...

  • Author

Thanks for the reply Lucid.

 

The index numbers I referred to in my post are the numbers you mentioned there.

 

I haven't come up with any other ideas at this point.

  • Author

What I've essentially done is tried replacing "A.U.S. Central Standard Time" with "255" for the string.

 

I've had no success myself using the index numbers, not sure if they are meant to work at all.

  • Author

I actually pulled off the error today from an SCCM report:

 

Time Zone: A.U.S. Eastern Standard Time Searching time zone 'A.U.S. Eastern Standard Time' to find index. Setting product key. Setting local admin password. 
Licensing Mode: Per Seat Exiting with return code 0x00000000 Failed to find index value for timezone 'A.U.S. Eastern Standard Time'. Defaulting to GMT Standard Time 

 

Then I select one of our North American locations and its fine:

 

Time Zone: Central Standard Time Searching time zone 'Central Standard Time' to find index. Index value for 'Central Standard Time' timezone is 20 Setting product key. Setting local admin password. Licensing Mode: Per Seat Exiting with return code 0x00000000 

 

Same format of code for both...

  • Author

....And fixed it.

 

Despite Microsoft's format on their website being "A.U.S. Eastern Standard Time" I changed it to "AUS Eastern Standard Time" and now it is setting the timezone correctly.

 

I was thinking it might have had something to do with those full stops!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.