diff --git a/apps/wpm/views.py b/apps/wpm/views.py index 6ad0d962..45db024f 100644 --- a/apps/wpm/views.py +++ b/apps/wpm/views.py @@ -36,6 +36,7 @@ from apps.enm.models import EnStat from django.db.models import Q from apps.utils.tools import convert_ordereddict, update_dict from django.db.models import Count +from datetime import datetime, timedelta # Create your views here. @@ -720,7 +721,7 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust @classmethod def gen_number_with_rule(cls, rule, material_out:Material, gen_count=1): from apps.wpmw.models import Wpr - now = timezone.now() + now = datetime.now() - timedelta(hours=6, minutes=20) c_year = now.year c_year2 = str(c_year)[-2:] c_month = now.month