-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
submission publish_date doesn't consider dst #274
Comments
Perhaps a Django bug? AFAIK, we didn’t implement more than the absolute minimum in the archive views.
|
Can we be sure, that everything to and from the DB is handled as UTC? I found one place where the timezone is requested from settings and a python datetime object gets mixed in:
but I could not find, where this method gets called. Can someone give a hand here? Does it hang around idle? Probably related: #74 |
Seems dead code to me. But perhaps it shouldn’t be dead and that’s the issue. Did you look at the linked GH issue?
|
Yes, most changes are for |
Hi,
I am on UTC+1 (MEZ) timezone. I was filing a test nsl between 00:00 and 01:00 am. During this period of time the day of the archive url was 1 day past the day of the Submission object.
The dst calculation seems to be correct (this time without dst, winter time +00:00):
2019-03-15 00:00:14+00:00
But the hour is too low by 1 and thus the day gets also too low by one during 00:00 and 01:00 am.
The timestamp given should read as:
2019-03-15 01:00:14+00:00
Curios because the day gets calculated from the model's
get_absolute_url(self)
method of the Submission object, which uses:publish_date = models.DateTimeField( verbose_name=_('publication date'), blank=True, null=True, default=now, db_index=True )
The archive template makes use of this method and the Submission object holds it.
So from where do we get the deviation of 1 day for 1 hour?
The text was updated successfully, but these errors were encountered: