_Note_: for support questions, please use one of these channels: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#question. This repository's issues are reserved for feature requests and bug reports.
Do you want to request a _feature_ or report a _bug_?
Bug
What is the current behavior?
When date filter with 'UTC' timezone is used in a browser opened on Israel timezone, DST change date Mar 25 having issue.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (template: http://plnkr.co/edit/tpl:yBpEi4).
http://plnkr.co/edit/K48gXbI4vCf09TgmsPEO?p=preview
What is the expected behavior?
Epoc time '1458874500000' should show 2.55AM and '1458874800000' should show 3.00 AM. Currently '1458874500000' is showing 3.55 AM
What is the motivation / use case for changing the behavior?
Angular date filter should work with DST also.
Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.
Angular version : v1.4.8,
Browser : Chrome
Other information (e.g. stacktraces, related issues, suggestions how to fix)
This happens because of how we are trying to convert to another timezone and Daylight savings.
Daylight savings took effect on 03/25/2016 @ 2:00 AM Israel time. Basically, at that time the "clocks" should be turned one hour ahead (2:00 AM --> 3:00 AM).
The way we are trying to convert from the user's timezone to another one, is by creating a Date object whose values are such that the getXyz() methods (which return local values), will return the appropriate values.
So, for example you are passing a Date that corresponds to @ 02:55 UTC, so we are trying to create a Date object so that getHours() will return 2 (which means 2 in your local timezone). But there is no such object, because there is no @ 02:00 local time in Israel (since clocks "jumped" form 01:59:59.999 to 03:00:00.000).
I'm not sure whether this is fixable (in a sane and reliable way), but will look into it.
Thanks gkalpak for looking into this. Can you please let us know the approximate timeline of when the fix would be available?
@JanyJose, it's not a high priority atm, so there is no specific timeline.
gkalpak,
I am also facing the same issue, can you please let me know in which version the fix is/will be available?
If not so please provide at least workaround for the issue.
Thanks,
Jitendra
@raijitendra, I didn't have the chance to work on this yet. (Like I said, it is not a high priority.)
It is still on my TODO list, so I will update the issue if/when I get to it.
@gkalpak It could be helpful if some workaround is provided.
Sure, if you have one, please share :smile:
Did anyone manage to find a workaround for this?
2 years later, this is still happening and annoying as it breaks our tests.
Note that the issue is not specific to the Isarel timezone (also applies to GMT and therefore probably any timezone). Specifying a minute later is OK.
Note that this is issue has a much wider impact in a more complex client-server scenario where a user creates a schedule for a (local) date-time after DST and can also view that schedule at a time before or after DST. Although internally, the back-end uses UTC, it still creates those odd scenarios where one can be an hour off.
@bergmeister - I am sorry that this is a problem for you. As the project is now in LTS mode, we are not fixing bugs like this anymore.
The good news about LTS is that there will be no more (significant) changes to the AngularJS code base. This means that you can fork the Date filter so that it does not suffer from this problem confident that there will not be changes to the Date filter in the future that you would need to port to your fork.
@petebacondarwin Thanks for the info. I created an issue in Angular here (our project migrated from AngularJS to Angular so this issue is therefore still happening in Angular).
Most helpful comment
@petebacondarwin Thanks for the info. I created an issue in Angular here (our project migrated from AngularJS to Angular so this issue is therefore still happening in Angular).