mde / timezone-js

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

toISOString() needs to convert to UTC or include tz offset #22

Closed tadfisher closed 12 years ago

tadfisher commented 12 years ago

toISOString outputs times in the timezoneJS.Date's set timezone, but outputs with a "Z" appended which means UTC time.

Correct behavior is to either convert to UTC before outputting ISO8601 strings with "Z" appended, or include the offset (-10:00, +05:00, etc). Most implementations do the former.

tadfisher commented 12 years ago

You are a machine! Thanks!

mde commented 12 years ago

Holy shit. Awesome work!