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

[Bug]: Date formatting ignored #587

Closed
Emma0Z opened this issue Aug 11, 2023 · 1 comment
Closed

[Bug]: Date formatting ignored #587

Emma0Z opened this issue Aug 11, 2023 · 1 comment
Labels
bug Something isn't working scope: i18n wontfix This will not be worked on works as designed

Comments

@Emma0Z
Copy link
Contributor

Emma0Z commented Aug 11, 2023

Description of the Bug

While modifying the TIME_ZONE and all date formatting to the configuration.py, the date format and orientation are not applied and stay in original UTC/US way.

# Time zone (default: UTC)
TIME_ZONE = 'CET'

# Date/time formatting. See the following link for supported formats:
# https://docs.djangoproject.com/en/stable/ref/templates/builtins/#date
DATE_FORMAT = 'j N Y'
SHORT_DATE_FORMAT = 'd-m-Y'
TIME_FORMAT = 'G:i a'
SHORT_TIME_FORMAT = 'H:i:s'
DATETIME_FORMAT = 'j N Y, G:i'
SHORT_DATETIME_FORMAT = 'd-m-Y H:i'

I've check the docs of django for cheking what should I put over there :/

Expected behavior

It should be this
image

But it stayed like this
image

Reproduction

  1. Edit /opt/status-page/statuspage/statuspage/configuration.py
  2. Reload services
  3. Check on web page

Version

2.0.0 (Preview)

Information about your Device

Desktop (please complete the following information):

  • OS: Debian 11.7
  • Browser : Firefox
  • Version 116.0.2

Smartphone (please complete the following information):

  • Device: othing Phone (1)
  • OS: Android 13
  • Browser Brave
  • Version 1.56.20

Relevant log output

Not sure if this related


Aug 11 12:31:05 ninja-status-vincent-d01 python3[3114]: 12:31:05 Registering birth
Aug 11 12:31:05 ninja-status-vincent-d01 python3[3114]: /opt/status-page/venv/lib/python3.10/site-packages/rq_scheduler/utils.py:28: FutureWarning: Version 0.22.0+ of crontab will use datetime.utcnow() and
Aug 11 12:31:05 ninja-status-vincent-d01 python3[3114]: datetime.utcfromtimestamp() instead of datetime.now() and
Aug 11 12:31:05 ninja-status-vincent-d01 python3[3114]: datetime.fromtimestamp() as was previous. This had been a bug, which will be
Aug 11 12:31:05 ninja-status-vincent-d01 python3[3114]: remedied. If you would like to keep the *old* behavior:
Aug 11 12:31:05 ninja-status-vincent-d01 python3[3114]: `ct.next(..., default_utc=False)` . If you want to use the new behavior *now*:
Aug 11 12:31:05 ninja-status-vincent-d01 python3[3114]: `ct.next(..., default_utc=True)`. If you pass a datetime object with a tzinfo
Aug 11 12:31:05 ninja-status-vincent-d01 python3[3114]: attribute that is not None, timezones will *just work* to the best of their
Aug 11 12:31:05 ninja-status-vincent-d01 python3[3114]: ability. There are tests...
Aug 11 12:31:05 ninja-status-vincent-d01 python3[3114]:   next_time = cron.next(now=now, return_datetime=True)


(this has already corrected on my side)
@Emma0Z Emma0Z added bug Something isn't working unverified labels Aug 11, 2023
@herrtxbias
Copy link
Member

herrtxbias commented Dec 30, 2023

Hey @Emma0Z,
sorry for the late reply. I was kinda busy and then just forgot about the Incidents in this Project :D

It seems like this behaviour is working as designed by django and therefore shows dates as usual for you locale: https://docs.djangoproject.com/en/4.2/ref/settings/#use-l10n

As stated there, starting with Django 5, this setting wont be available anymore.

Edit: I think it only uses the Languages i have configured statically, so no other language than English and German will be currently available for localization.

@herrtxbias herrtxbias added works as designed wontfix This will not be worked on scope: i18n and removed unverified labels Dec 30, 2023
@herrtxbias herrtxbias closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working scope: i18n wontfix This will not be worked on works as designed
Projects
None yet
Development

No branches or pull requests

2 participants