Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(filter): support conversion to timezone other than UTC #10858

Closed
wants to merge 1 commit into from

Conversation

@shahata
Copy link
Contributor

@shahata shahata commented Jan 24, 2015

No description provided.

@shahata shahata force-pushed the shahata:non-utc-timezones branch from 5bea0b2 to 2968e50 Jan 24, 2015
@shahata
Copy link
Contributor Author

@shahata shahata commented Jan 24, 2015

If this is something we want, I can do it also for ng-model-options, but let's get this in first

expect(date(new Date(Date.UTC(2003, 8, 10, 3, 2, 4)), 'yyyy-MM-dd HH-mm-ssZ', 'GMT+0500')).toEqual('2003-09-10 08-02-04+0500');
});

it('should fallback to default timezone in case an unknown timezone was passed', function() {

This comment has been minimized.

@petebacondarwin

petebacondarwin Jan 26, 2015
Member

Question: Fallback to local or to UTC?

This comment has been minimized.

This comment has been minimized.

@petebacondarwin

petebacondarwin Jan 26, 2015
Member

I guess the current behaviour (before this PR) is to fallback to local time.

This comment has been minimized.

@shahata

shahata Jan 26, 2015
Author Contributor

I currently fallback to local tz, but I can change it if you think UTC is preferred.

This comment has been minimized.

@shahata

shahata Jan 26, 2015
Author Contributor

hmmm, yes, throwing is also a viable option. we could also have the filter output something that indicates a problem. not sure. I don't think we have any other filters that can fail, I'll look into it.

This comment has been minimized.

@petebacondarwin

petebacondarwin Jan 27, 2015
Member

Let's go with what you have - it is a reasonable default and it is what happens now.

@petebacondarwin
Copy link
Member

@petebacondarwin petebacondarwin commented Jan 29, 2015

LGTM - let's merge and then look at the date input controls

@shahata shahata closed this in c6d8512 Feb 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants