Repository: oppia/oppia

Issue:
Failing frontend tests due to wrong date time format.
**Describe the bug**
![new](https://user-images.githubusercontent.com/31371571/73594344-a7422500-4533-11ea-98bd-b41d3261e08e.png)



**To Reproduce**
Steps to reproduce the behavior:
Run the frontend tests
**Expected behavior**
The tests should pass

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information; delete this section if the issue does not arise on desktop):**
 - OS: [e.g. iOS] ubuntu 18.04
 - Browser [e.g. chrome, safari] chrome
 - Version [e.g. 22] v76.0.3809.100-1

**Additional context**
The error is happening after the tests in PR #8379 was merged
 The the line 52 in `date-time-format.service.ts` the function `date.toLocaleDateString()` is system and browser dependent . So possible fix would be adding appropriate checks in the test.
Example in chrome(ubuntu) the date is shown in dd/mm/yy instead of mm/dd/yy
![date](https://user-images.githubusercontent.com/31371571/73595117-b678a100-453a-11ea-9a91-57b33bd57bcb.png)
So, the failing test should consider the timezone and location  too

Failing frontend tests due to wrong date time format.
**Describe the bug**
![new](https://user-images.githubusercontent.com/31371571/73594344-a7422500-4533-11ea-98bd-b41d3261e08e.png)



**To Reproduce**
Steps to reproduce the behavior:
Run the frontend tests
**Expected behavior**
The tests should pass

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information; delete this section if the issue does not arise on desktop):**
 - OS: [e.g. iOS] ubuntu 18.04
 - Browser [e.g. chrome, safari] chrome
 - Version [e.g. 22] v76.0.3809.100-1

**Additional context**
The error is happening after the tests in PR #8379 was merged
 The the line 52 in `date-time-format.service.ts` the function `date.toLocaleDateString()` is system and browser dependent . So possible fix would be adding appropriate checks in the test.
Example in chrome(ubuntu) the date is shown in dd/mm/yy instead of mm/dd/yy
![date](https://user-images.githubusercontent.com/31371571/73595117-b678a100-453a-11ea-9a91-57b33bd57bcb.png)
So, the failing test should consider the timezone and location  too



Discussion:
@nithusha21 @marianazangrossi, Can you please check this? I too faced similar issues while running the frontend tests locally? 
I think @kevintab95 might have looked into this a bit too.
But @marianazangrossi -- I think you're point person for this, assuming that the test was introduced in one of the frontend test PRs...
Actually, I just remembered, the policy for things like this is: revert
first, fix later.

Anyone can revert this -- could someone please find the problematic commit
and send a revert PR? I'm out of the house now but will try to help get
that merged asap.

@nithusha21 @marianazangrossi, Can you please check this? I too faced similar issues while running the frontend tests locally? 
I think @kevintab95 might have looked into this a bit too.
But @marianazangrossi -- I think you're point person for this, assuming that the test was introduced in one of the frontend test PRs...
Actually, I just remembered, the policy for things like this is: revert
first, fix later.

Anyone can revert this -- could someone please find the problematic commit
and send a revert PR? I'm out of the house now but will try to help get
that merged asap.


Resolving patch:
diff --git a/scripts/check_frontend_coverage.py b/scripts/check_frontend_coverage.py
--- a/scripts/check_frontend_coverage.py
+++ b/scripts/check_frontend_coverage.py
@@ -95,7 +95,6 @@
     'creator-dashboard-page.constants.ajs.ts',
     'creator-dashboard-page.constants.ts',
     'data.ts',
-    'date-time-format.service.ts',
     'debug-info-tracker.service.ts',
     'drag-and-drop-sort-input-rules.service.ts',
     'DragAndDropSortInput.ts',


Test patch: