# Location.timeZone and zipCode are null

**URL:** <https://community.smartthings.com/t/location-timezone-and-zipcode-are-null/41584>\
**Category:** General Discussion\
**Created:** [March 8, 2016, 4:18am UTC](https://community.smartthings.com/t/location-timezone-and-zipcode-are-null/41584 "2016-03-08T04:18:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlv](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jlv/32/104336_2.png) [@jlv](https://community.smartthings.com/u/jlv)\
**Post date:** [March 8, 2016, 4:18am UTC](https://community.smartthings.com/t/location-timezone-and-zipcode-are-null/41584/1 "2016-03-08T04:18:51Z")

</div>

Where are these set? I’m having a problem because mine have apparently turned to undefined today. I added this in a SmartApp:

```
log.info "The time zone for this location is: ${location.timeZone}"
log.info "The zip code for this location: ${location.zipCode}"

```

and got:

```
10:56:57 PM: info The zip code for this location: null
10:56:57 PM: info The time zone for this location is: null

```

Sure enough, in the IDE the “My Location” shows my Time Zone as empty, but the ‘edit’ button there doesn’t give me the option to set it. I also just noticed that the times for Sunrise and Sunset (under ‘weather’) are now off by 5 hours (being that my timezone should be EST).

This used to be set correctly - up until yesterday. I did adjust the geofence area around my house this afternoon from within the app (before I upgraded to the 2.0.10 version).

Where is this set? @StrykerSKS has been helping me debug this.

---

<div class="post-metadata">

**Author:** ![slagle](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/slagle/32/16950_2.png) [@slagle](https://community.smartthings.com/u/slagle)\
**Post date:** [March 8, 2016, 4:22am UTC](https://community.smartthings.com/t/location-timezone-and-zipcode-are-null/41584/2 "2016-03-08T04:22:59Z")

</div>

Definitely open a support ticket. But a quick fix might be to move your geofence and move it back.

---

<div class="post-metadata">

**Author:** ![jlv](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jlv/32/104336_2.png) [@jlv](https://community.smartthings.com/u/jlv)\
**Post date:** [March 8, 2016, 4:26am UTC](https://community.smartthings.com/t/location-timezone-and-zipcode-are-null/41584/3 "2016-03-08T04:26:31Z")

</div>

I adjusted the geofence by a few feet – shrinking it really. I already tried adjusting it back to no avail.

I did realize the one Zip code setting: I have it set in the SmartWeather device to my WU PWS (pws:KMASOUTH47) for my BloomSky.

I’ll open the support ticket. Hopefully I’ll get more help than with the missing icons in the app on my fire tablet.

---

<div class="post-metadata">

**Author:** ![jlv](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jlv/32/104336_2.png) [@jlv](https://community.smartthings.com/u/jlv)\
**Post date:** [March 8, 2016, 4:35am UTC](https://community.smartthings.com/t/location-timezone-and-zipcode-are-null/41584/4 "2016-03-08T04:35:24Z")

</div>

My house is on _(crosses)_ the town (and county) line. I just checked the geofence an realized that it slightly crossed the town/county line. I moved it slightly so that it no longer crosses the town border (cutting off 150 sq.ft. of my property), but now I once again am seeing a Time Zone in the IDE.

---

<div class="post-metadata">

**Author:** ![StrykerSKS](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/strykersks/32/23007_2.png) [@StrykerSKS](https://community.smartthings.com/u/StrykerSKS)\
**Post date:** [March 8, 2016, 4:36am UTC](https://community.smartthings.com/t/location-timezone-and-zipcode-are-null/41584/5 "2016-03-08T04:36:56Z")

</div>

Well, at least now it might make it easier for the team to troubleshoot and come up with a resolution!

---

<div class="post-metadata">

**Author:** ![slagle](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/slagle/32/16950_2.png) [@slagle](https://community.smartthings.com/u/slagle)\
**Post date:** [March 8, 2016, 4:56am UTC](https://community.smartthings.com/t/location-timezone-and-zipcode-are-null/41584/6 "2016-03-08T04:56:11Z")

</div>

> [@jlv](#):
>
> My house is on the town (and county) line. I just checked the geofence an realized that it slightly crossed the town/county line. I moved it slightly so that it no longer crosses the town border (cutting off 150 sq.ft. of my property), but now I once again am seeing a Time Zone in the IDE.

This was probably the issue. Whatever service we use to give us the zip codes probably couldn’t provide one.

---

<div class="post-metadata">

**Author:** ![jlv](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jlv/32/104336_2.png) [@jlv](https://community.smartthings.com/u/jlv)\
**Post date:** [March 8, 2016, 5:45am UTC](https://community.smartthings.com/t/location-timezone-and-zipcode-are-null/41584/7 "2016-03-08T05:45:29Z")

</div>

That makes sense. I really hate where I live! 😫

* * *

I happened to catch this by accident: first I noticed something hadn’t polled for a while:

> [@\[OBSOLETE\] .. Updated Open Source Ecobee Device Type and SmartApps](https://community.smartthings.com/t/release-updated-open-source-ecobee-device-type-and-smartapps/34335/489):
>
> I’m seeing the UI looking like the above post. Pretty nice. One oddness I just noticed: my last poll is 15:53 EST, which was about 6 hours ago! That’s the last event shown in the Recently tab, too.

and looking into it I found a NullPointerException:

> [@\[OBSOLETE\] .. Updated Open Source Ecobee Device Type and SmartApps](https://community.smartthings.com/t/release-updated-open-source-ecobee-device-type-and-smartapps/34335/490):
>
> I happened to catch this in the live logging on the thermostat device: 10:14:44 PM: error java.lang.NullPointerException @ line 2070 10:14:44 PM: debug Executing 'poll' using parent SmartApp That looks to be this format call: private def String getTimestamp() { return new Date().format("yyyy-MM-dd HH:mm:ss z", location.timeZone) }

---

<div class="post-metadata">

**Author:** ![jlv](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jlv/32/104336_2.png) [@jlv](https://community.smartthings.com/u/jlv)\
**Post date:** [March 8, 2016, 7:15pm UTC](https://community.smartthings.com/t/location-timezone-and-zipcode-are-null/41584/8 "2016-03-08T19:15:33Z")

</div>

[quote=“slagle, post:6, topic:41584”]  
Whatever service we use to give us the zip codes probably couldn’t provide one.  
[/quote]Of course the ‘pin’ for the center of the geofence was clearly in only 1 town (1 zip code), so I’m surprised anything but that point is used to define the zipCode. Either way, both towns are (thankfully) in the same time zone!
