Automatic time conversion #147

Closed
opened 2020-12-22 21:13:36 +01:00 by Serraniel · 7 comments
Serraniel commented 2020-12-22 21:13:36 +01:00 (Migrated from github.com)

Times on Aniwatch are always displayed in UTC+1. These should be converted into localtime for the user. By default the local time should be tried to auto detect. Additionally you can configure your UTC Offset to override the default.

Times on Aniwatch are always displayed in UTC+1. These should be converted into localtime for the user. By default the local time should be tried to auto detect. Additionally you can configure your UTC Offset to override the default.
Serraniel commented 2020-12-23 20:09:51 +01:00 (Migrated from github.com)

Potential datetime / time information:

  • Anime / Launch badge
    image
  • Anime / Broadcast badge
    image
  • Profile / Chronicle
    image
  • Profile / Anime List / Hovering an anime
    image
  • Profile / Media
    image
  • Profile / Friends
    image
  • Notifications
    image
  • Landing page / Info box
    image
Potential datetime / time information: * Anime / Launch badge ![image](https://user-images.githubusercontent.com/8461282/103029967-2761e680-455b-11eb-847d-813307efb49b.png) * Anime / Broadcast badge ![image](https://user-images.githubusercontent.com/8461282/103029993-30eb4e80-455b-11eb-8137-2f91910567e2.png) * Profile / Chronicle ![image](https://user-images.githubusercontent.com/8461282/103030076-5d9f6600-455b-11eb-8315-defd8e1cde01.png) * Profile / Anime List / Hovering an anime ![image](https://user-images.githubusercontent.com/8461282/103030145-7a3b9e00-455b-11eb-8a35-5ccb9485ab49.png) * Profile / Media ![image](https://user-images.githubusercontent.com/8461282/103030201-917a8b80-455b-11eb-8ca7-2f8f9d7945a1.png) * Profile / Friends ![image](https://user-images.githubusercontent.com/8461282/103030211-9b9c8a00-455b-11eb-849a-32458776978d.png) * Notifications ![image](https://user-images.githubusercontent.com/8461282/103030241-ace59680-455b-11eb-880a-44d35eeb0de8.png) * Landing page / Info box ![image](https://user-images.githubusercontent.com/8461282/103029934-1913ca80-455b-11eb-822e-a147064635ad.png)
Serraniel commented 2020-12-23 20:10:32 +01:00 (Migrated from github.com)
  • Must be clarified: Does aniwatch utilize DST and switch to UTC+2 in summer or do they always display in UTC+1?
- [x] Must be clarified: Does aniwatch utilize DST and switch to UTC+2 in summer or do they always display in UTC+1?
Serraniel commented 2020-12-23 20:23:01 +01:00 (Migrated from github.com)

I added screenshots of the time representations in the DOM into the comment listing all occurences (I could find). Detecting time shall be easy with a regular expression searching for the numbers with the colon followed by either AM or PM.
he difficult par will be to fix the date. To make it even harder they use inconsistent representations (dd/mm/yyyy / <day> at / dd.mm.yyyy / today at).

I added screenshots of the time representations in the DOM into the comment listing all occurences (I could find). Detecting time shall be easy with a regular expression searching for the numbers with the colon followed by either AM or PM. he difficult par will be to fix the date. To make it even harder they use inconsistent representations (`dd/mm/yyyy` / `<day> at` / `dd.mm.yyyy` / `today at`).
Serraniel commented 2020-12-24 16:43:15 +01:00 (Migrated from github.com)
  • Must be clarified: Does aniwatch utilize DST and switch to UTC+2 in summer or do they always display in UTC+1?

According to the Devs it technically would change to +2 with the current code. However this will be changed by aniwatch until the next spring.

> * [ ] Must be clarified: Does aniwatch utilize DST and switch to UTC+2 in summer or do they always display in UTC+1? According to the Devs it technically would change to +2 with the current code. However this will be changed by aniwatch until the next spring.
Serraniel commented 2020-12-28 14:26:42 +01:00 (Migrated from github.com)

Possible regex patterns:

Times:
\d?\d:\d{2}( (AM|PM))?
201228_14-23-17-146 Online_regex_tester_and_debugger_PHP,_PCRE,_Pytho

Date:
(\d{2}(\/|\.)){2}\d{4}
201228_14-25-51-954 Online_regex_tester_and_debugger_PHP,_PCRE,_Pytho

Datetime:
(\d{2}(\/|\.)){2}\d{4} *\d?\d:\d{2}( (AM|PM))?
image

Possible regex patterns: Times: `\d?\d:\d{2}( (AM|PM))?` ![201228_14-23-17-146 Online_regex_tester_and_debugger_PHP,_PCRE,_Pytho](https://user-images.githubusercontent.com/8461282/103217319-9901b200-4918-11eb-9a2c-8493f9379715.png) Date: `(\d{2}(\/|\.)){2}\d{4}` ![201228_14-25-51-954 Online_regex_tester_and_debugger_PHP,_PCRE,_Pytho](https://user-images.githubusercontent.com/8461282/103217329-9f902980-4918-11eb-8b31-3ea32dc5841a.png) Datetime: `(\d{2}(\/|\.)){2}\d{4} *\d?\d:\d{2}( (AM|PM))?` ![image](https://user-images.githubusercontent.com/8461282/103217302-90a97700-4918-11eb-81f5-8fb04053b6d8.png)
Serraniel commented 2020-12-28 18:15:26 +01:00 (Migrated from github.com)

Data displayed on https://aniwatch.me/airing should not be changed because we would have to restructure the full page then. Additionally there is a big hint that all data is displayed in UTC+1.

Data displayed on https://aniwatch.me/airing should not be changed because we would have to restructure the full page then. Additionally there is a big hint that all data is displayed in UTC+1.
Serraniel commented 2021-01-03 17:50:59 +01:00 (Migrated from github.com)

This issue has been resolved with v1.0 release.

This issue has been resolved with v1.0 release.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Serraniel/AniwatchPlus#147
No description provided.