Skip to content
This repository has been archived by the owner on Dec 24, 2022. It is now read-only.

Commit

Permalink
Fix Spotify random data times GH-59
Browse files Browse the repository at this point in the history
Switched to 24-hour clock cycle.

Signed-off-by: Brian Evans <[email protected]>
  • Loading branch information
mrbrianevans committed Apr 8, 2022
1 parent 0d003a2 commit fa77299
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 43 deletions.
82 changes: 41 additions & 41 deletions demo-files/spotify/StreamingHistory0.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
[
{
"endTime": "2021-08-01 3:09 AM",
"artistName": "U2",
"trackName": "With Or Without You",
"msPlayed": 4321
"endTime": "2020-07-02 12:06",
"artistName": "Sonny & Cher",
"trackName": "I Got You Babe",
"msPlayed": 188258
},
{
"endTime": "2021-06-03 11:19 AM",
"artistName": "Sam Cooke",
"trackName": "Bring It On Home To Me",
"msPlayed": 3957
"endTime": "2019-12-29 13:14",
"artistName": "Roberta Flack",
"trackName": "Killing Me Softly With His Song",
"msPlayed": 295851
},
{
"endTime": "2020-10-25 10:37 PM",
"artistName": "Paul Anka",
"trackName": "Diana",
"msPlayed": 4796
"endTime": "2020-12-09 14:08",
"artistName": "Percy Sledge",
"trackName": "When A Man Loves A Woman",
"msPlayed": 272388
},
{
"endTime": "2020-04-21 2:03 PM",
"artistName": "Bing Crosby",
"trackName": "Pennies From Heaven",
"msPlayed": 250574
"endTime": "2020-01-08 02:55",
"artistName": "Platters",
"trackName": "The Great Pretender",
"msPlayed": 4799
},
{
"endTime": "2021-03-20 1:21 PM",
"artistName": "Herb Alpert and the Tijuana Brass",
"trackName": "A Taste Of Honey",
"msPlayed": 2187
"endTime": "2021-10-17 06:32",
"artistName": "Run-D.M.C.",
"trackName": "It's Like That",
"msPlayed": 180810
},
{
"endTime": "2020-04-14 3:10 PM",
"artistName": "Elvis Presley",
"trackName": "Heartbreak Hotel",
"msPlayed": 180293
"endTime": "2019-09-14 07:59",
"artistName": "Ben E. King",
"trackName": "Stand By Me",
"msPlayed": 302
},
{
"endTime": "2021-05-09 11:09 AM",
"artistName": "Tito Puente",
"trackName": "Oye Coma Va",
"msPlayed": 1544
"endTime": "2019-10-07 04:48",
"artistName": "Tommy Dorsey (Frank Sinatra and the Pied Pipers)",
"trackName": "I'll Never Smile Again",
"msPlayed": 1280
},
{
"endTime": "2020-10-07 8:08 AM",
"artistName": "Black Sabbath",
"trackName": "Paranoid",
"msPlayed": 275596
"endTime": "2020-05-31 10:48",
"artistName": "Martha and the Vandellas",
"trackName": "(Love Is Like A) Heat Wave",
"msPlayed": 3004
},
{
"endTime": "2020-05-06 4:21 AM",
"artistName": "Curtis Mayfield",
"trackName": "Superfly",
"msPlayed": 333
"endTime": "2019-10-19 05:29",
"artistName": "Lloyd Price",
"trackName": "Lawdy Miss Clawdy",
"msPlayed": 169345
},
{
"endTime": "2019-08-11 8:25 PM",
"artistName": "Whitney Houston",
"trackName": "I Will Always Love You",
"msPlayed": 2184
"endTime": "2020-01-22 01:15",
"artistName": "Hank Williams",
"trackName": "Hey Good Lookin'",
"msPlayed": 372
}
]
]
2 changes: 1 addition & 1 deletion lib-testing/browser-tests/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const config = {
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: 5000
timeout: 15000
},
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
Expand Down
4 changes: 3 additions & 1 deletion lib/vendors/spotify/StreamingHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ function formatDate(date: Date): string {
return (
formatDateEur(date) +
' ' +
Intl.DateTimeFormat('en', { timeStyle: 'short' }).format(date)
Intl.DateTimeFormat('en', { timeStyle: 'short', hour12: false }).format(
date
)
)
}

Expand Down

0 comments on commit fa77299

Please sign in to comment.