dangrossman/bootstrap-daterangepicker — pull request #485 by RustyToms (2014-10-30 04:37:37+00:00)
Title: create and use timeZone property

My app requires the exclusive use of UTC time. While I can send in the startDate and endDate as moment objects with whatever time zones I choose, the creation of the calendar currently mutates whatever time zone is used into the local time zone. The buildCalendar function is sent the hour that is reported by the startDate and endDate using whatever timezones they have been assigned. It uses that hour to make a moment object in the local timezone with that same hour, creating a different time, depending on the timezone the user is in.

This problem only reveals itself when the user uses the custom range calendar to select a different day. The time stored in that day appears to be the same time of day, but it is actually the same time of day in a different timezone. Here is a JSBin illustrating the problem. Use the calendar to change only the starting day. The start day and end day appear to have the same time, but if they are in different time zones. The true times returned by the datepicker are displayed below the input. http://jsbin.com/dudixutude/5/edit?js,output

Here is a JSBin with the fix. The calendar is built using the timezone that is explicitly defined, or that is actually being used on the startDate. This eliminates the time zone issue. http://jsbin.com/tamapekuqe/4/edit?js,output

Here is a gif of the problem:
![time_zone_problem](https://cloud.githubusercontent.com/assets/5260472/4838641/d8d554c4-5fed-11e4-8c96-a1b2fe6e90aa.gif)

closes #210