Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBC22-3158: used timezone data coming from DIT #783

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bcgov-brwang
Copy link
Collaborator

DBC22-3158: used timezone data coming from DIT

@bcgov-brwang bcgov-brwang requested a review from ray-oxd December 16, 2024 19:52
@ray-oxd ray-oxd force-pushed the bugfix/DBC22-3158-2 branch from d38df28 to 76e20a5 Compare December 17, 2024 01:00
Copy link
Collaborator

@ray-oxd ray-oxd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get the following error when clicking on an event on the map:

FriendlyTime.js:25 Uncaught RangeError: Invalid time zone specified: null
at new DateTimeFormat ()
at formatDate (FriendlyTime.js:25:1)

@bcgov-brwang
Copy link
Collaborator Author

I get the following error when clicking on an event on the map:

FriendlyTime.js:25 Uncaught RangeError: Invalid time zone specified: null at new DateTimeFormat () at formatDate (FriendlyTime.js:25:1)

Yes there is a logic error in the code where I will get it fixed. But I noticed the tasks container can't be started correctly and the events can't be populated due to the tasks error.

7 Traceback (most recent call last):
2024-12-16 19:31:27 File "/app/backend/apps/webcam/tasks.py", line 150, in update_webcam_image
2024-12-16 19:31:27 with urllib.request.urlopen(endpoint) as url:
2024-12-16 19:31:27 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-16 19:31:27 File "/usr/local/lib/python3.11/urllib/request.py", line 216, in urlopen
2024-12-16 19:31:27 return opener.open(url, data, timeout)
2024-12-16 19:31:27 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-16 19:31:27 File "/usr/local/lib/python3.11/urllib/request.py", line 525, in open
2024-12-16 19:31:27 response = meth(req, response)
2024-12-16 19:31:27 ^^^^^^^^^^^^^^^^^^^
2024-12-16 19:31:27 File "/usr/local/lib/python3.11/urllib/request.py", line 634, in http_response
2024-12-16 19:31:27 response = self.parent.error(
2024-12-16 19:31:27 ^^^^^^^^^^^^^^^^^^
2024-12-16 19:31:27 File "/usr/local/lib/python3.11/urllib/request.py", line 563, in error
2024-12-16 19:31:27 return self._call_chain(*args)
2024-12-16 19:31:27 ^^^^^^^^^^^^^^^^^^^^^^^
2024-12-16 19:31:27 File "/usr/local/lib/python3.11/urllib/request.py", line 496, in _call_chain
2024-12-16 19:31:27 result = func(*args)
2024-12-16 19:31:27 ^^^^^^^^^^^
2024-12-16 19:31:27 File "/usr/local/lib/python3.11/urllib/request.py", line 643, in http_error_default
2024-12-16 19:31:27 raise HTTPError(req.full_url, code, msg, hdrs, fp)
2024-12-16 19:31:27 urllib.error.HTTPError: HTTP Error 403: Forbidden
2024-12-16 19:31:27 HTTP Error 403: Forbidden

DBC22-3158: updated timezone for chain ups
@@ -148,6 +147,8 @@ def populate_all_event_data():
for chain_up in chain_ups:
active_event_ids.append(chain_up.validated_data['id'])
chain_up.save()
tz=chain_up.validated_data['first_created'].tzinfo.key
Event.objects.filter(id=chain_up.validated_data['id']).update(timezone=tz)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we go over this? I don't understand what we're trying to achieve here

DBC22-3158: rework done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants