angular/angular.js — pull request #1917 by latentflip (2013-01-30 10:00:20+00:00)
Title: fix(filter:date) Timezone formatting issues.

This commit fixes #1261 and #1532. This covers two separate issues:

- Positive timezones were being formatted without a leading `+` resulting in a formatting string like: "HH:MM:ssZ" giving "12:13:141000" instead of "12:13:14+1000". Fixed by checking if timezone is > 0 and adding a leading "+".

- Timezone output signs were inverted. mock.TzDate expects the timezone _offset_ as it's first argument, _not_ the timezone. This means that a mock.TzDate with a positive offset should result in a date string with a negative timezone,
and vice-versa.

I've tried to stick to the style as much as possible. I have one question about this commit though: [ISO_8601](http://en.wikipedia.org/wiki/ISO_8601) states:

> An offset of zero, in addition to having the special representation "Z", can also be stated numerically as "+00:00", "+0000", or "+00". However, it is not permitted to state it numerically with a negative sign, as "-00:00", "-0000", or "-00".

I have chosen that a UTC/0 offset timezone is represented with a Z, like: "12:13:14Z" as that seems to be more normal. Is that okay, or would "12:13:14+0000" be better for some reason?

**I have signed the CLA, I am Philip Roberts from Scotland :smile:**