DHCP Option 002 (Time-offset) for #Lync and #Polycom Phones

*** Update 11/27/2014 - It was asked in the comments if this applies to the Lync Phone Edition devices (LPE). LPE is created/maintained by Microsoft but various companies manufacture the devices, including Polycom. The Polycom LPE’s are the CX series phones. This article does not apply to the LPE devices. It only applies to the Polycom phones that run Polycom’s own software such as the VVX line of phones.

Lately, I have found myself having to do the math for the time offset for DHCP Option 002. I decided it was worth just documenting them so I could look them up quickly and what better way to come up with all of them than with Powershell?

EDIT (I realized that I shouldn’t have done 1-24 for the timezones, you actually have to account for time zones after and before (East and West) of GMT): <del>$timezone = @(1..24)</del> <del> foreach ($i in $timezone) { $a = (3600 * -$i); $b = ("{0:X0}" -f $a); write ("0x" + $b)}</del>

$timezone = @(1..12) $results = @() write “Timezones East of GMT:” foreach ($i in $timezone) {

Get TimeZones East of GMT

$a = (3600 * $i) $b = (“{0:X0}” -f $a) write (“Timezone ” + $i + “ - 0x” + $b) } write “Timezones West of GMT:” foreach ($i in $timezone) {

Get TimeZones East of GMT

$a = (3600 * -$i) $b = (“{0:X0}” -f $a) write (“Timezone -” + $i + “ - 0x” + $b) }

This will give you:

Timezones East of GMT: Timezone 1 - 0xE10 Timezone 2 - 0x1C20 Timezone 3 - 0x2A30 Timezone 4 - 0x3840 Timezone 5 - 0x4650 Timezone 6 - 0x5460 Timezone 7 - 0x6270 Timezone 8 - 0x7080 Timezone 9 - 0x7E90 Timezone 10 - 0x8CA0 Timezone 11 - 0x9AB0 Timezone 12 - 0xA8C0 Timezones West of GMT: Timezone -1 - 0xFFFFF1F0 Timezone -2 - 0xFFFFE3E0 Timezone -3 - 0xFFFFD5D0 Timezone -4 - 0xFFFFC7C0 Timezone -5 - 0xFFFFB9B0 Timezone -6 - 0xFFFFABA0 Timezone -7 - 0xFFFF9D90 Timezone -8 - 0xFFFF8F80 Timezone -9 - 0xFFFF8170 Timezone -10 - 0xFFFF7360 Timezone -11 - 0xFFFF6550 Timezone -12 - 0xFFFF5740

Pretty simple and now I can just look up what I need versus doing the math each time.

comments powered by Disqus