Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMASCH
scheduling-system
Commits
bf51c8cd
Commit
bf51c8cd
authored
7 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
midnight is timezone aware
parent
fc855e1f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!60
Resolve "Export to Excel"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
smash/web/views/notifications.py
+3
-2
3 additions, 2 deletions
smash/web/views/notifications.py
with
3 additions
and
2 deletions
smash/web/views/notifications.py
+
3
−
2
View file @
bf51c8cd
# coding=utf-8
import
datetime
from
django.utils
import
timezone
from
django.contrib.auth.models
import
User
,
AnonymousUser
from
django.db.models
import
Count
,
Case
,
When
...
...
@@ -239,6 +240,6 @@ def get_filter_locations(user):
def
get_today_midnight_date
():
today
=
datetime
.
datetim
e
.
now
()
today_midnight
=
datetime
.
datetime
(
today
.
year
,
today
.
month
,
today
.
day
)
today
=
timezon
e
.
now
()
today_midnight
=
datetime
.
datetime
(
today
.
year
,
today
.
month
,
today
.
day
,
tzinfo
=
today
.
tzinfo
)
return
today_midnight
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment