mde / timezone-js

DEPRECATED: Timezone-enabled JavaScript Date object. Uses Olson zoneinfo files for timezone data.
824 stars 183 forks source link

Copy constructor for timezoneJS.Date objects #108

Closed mnpenner closed 4 years ago

mnpenner commented 11 years ago
var newDate = new timezoneJS.Date(oldTimezoneJsDateObj)

Constructs a new date but discards the timezone information from the old date. I'm presently working around the issue by constructing it this way:

var newDate = new timezoneJS.Date(oldTimezoneJsDateObj, oldTimezoneJsDateObj.timezone)
longlho commented 10 years ago

This issue shouldn't be hard to fix. Can you provide a simple test case for this?