Skip to content

Commit

Permalink
关闭时区
Browse files Browse the repository at this point in the history
  • Loading branch information
liangliangyy committed Oct 15, 2024
1 parent 498def4 commit 34156d8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion djangoblog/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def env_to_bool(env, default):

USE_L10N = True

USE_TZ = True
USE_TZ = False

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.10/howto/static-files/
Expand Down
1 change: 0 additions & 1 deletion owntracks/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def get_datas(request):
date = list(map(lambda x: int(x), request.GET.get('date').split('-')))
querydate = django.utils.timezone.datetime(
date[0], date[1], date[2], 0, 0, 0)
querydate = django.utils.timezone.make_aware(querydate)
nextdate = querydate + datetime.timedelta(days=1)
models = OwnTrackLog.objects.filter(
creation_time__range=(querydate, nextdate))
Expand Down

0 comments on commit 34156d8

Please sign in to comment.