tidepool-org/tideline — pull request #182 by jebeck (2014-10-20 18:48:02+00:00)
Title: display data in an arbitrary timezone

This is the branch to allow displaying data in an arbitrary timezone in tideline. I believe it can be merged into master now because by default nothing changes - displaying data in a timezone is turned off until we have a UI in blip to select a timezone the user wants to view data in.

The general approach here is to introduce a `timePrefs` object that is part of tideline's `chartPrefs` (and kept track of in the React components (here in the example app, but similar/parallel code will be added in blip). A `timePrefs` object has two attributes:
```
{
timezoneAware: true|false,
timezoneName: string
}
```

The reason for having two attributes like this is that the vast majority of the time we *don't* need the official `timezoneName`; we only need to know that we're in `timezoneAware` mode, and we use the `displayOffset` (generated in nurseshark according to the named timezone specified by the user; this could be moved out of nurseshark into TidelineData - an open question to discuss) to display things appropriately. I think it's cleaner (and/or will keep tideline's code cleaner) to use the boolean when we can and only pass in and use the `timezoneName` where absolutely necessary.