feat: add timezone to datetime display across the board

- the "Flagged Out-of-date on ..." link in the package action panel does
  not contain a timezone specifier.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2022-02-05 18:35:50 -08:00
parent e777b7052e
commit 1545eab81d
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
15 changed files with 47 additions and 41 deletions

View file

@ -16,7 +16,7 @@ from aurweb.models.tu_voteinfo import TUVoteInfo
from aurweb.models.user import User
from aurweb.testing.requests import Request
DATETIME_REGEX = r'^[0-9]{4}-[0-9]{2}-[0-9]{2}$'
DATETIME_REGEX = r'^[0-9]{4}-[0-9]{2}-[0-9]{2} \(.+\)$'
PARTICIPATION_REGEX = r'^1?[0-9]{2}[%]$' # 0% - 100%
@ -523,7 +523,7 @@ def test_tu_running_proposal(client: TestClient,
submitted = details.xpath(
'./div[contains(@class, "submitted")]/text()')[0]
assert re.match(r'^Submitted: \d{4}-\d{2}-\d{2} \d{2}:\d{2} by$',
assert re.match(r'^Submitted: \d{4}-\d{2}-\d{2} \d{2}:\d{2} \(.+\) by$',
submitted.strip()) is not None
submitter = details.xpath('./div[contains(@class, "submitted")]/a')[0]
assert submitter.text.strip() == tu_user.Username
@ -534,7 +534,7 @@ def test_tu_running_proposal(client: TestClient,
assert end_label.strip() == "End:"
end_datetime = end.xpath("./strong/text()")[0]
assert re.match(r'^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$',
assert re.match(r'^\d{4}-\d{2}-\d{2} \d{2}:\d{2} \(.+\)$',
end_datetime.strip()) is not None
# We have not voted yet. Assert that our voting form is shown.