mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-23 07:14:21 +00:00
🔧 Use timezone.now() instead of datetime.now()
This commit is contained in:
parent
93f28b9dad
commit
31b1a6e8c2
1 changed files with 2 additions and 3 deletions
|
@ -1,15 +1,14 @@
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.core import validators
|
from django.core import validators
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
from django.utils import timezone
|
||||||
import pandas
|
import pandas
|
||||||
import pandasdmx
|
import pandasdmx
|
||||||
import pandasdmx.message
|
import pandasdmx.message
|
||||||
import typing as t
|
import typing as t
|
||||||
import json
|
import json
|
||||||
import abc
|
import abc
|
||||||
import datetime
|
|
||||||
import logging
|
import logging
|
||||||
import pytz
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -292,7 +291,7 @@ class DataSource(models.Model):
|
||||||
log.debug(f"Synced {db_flow}!")
|
log.debug(f"Synced {db_flow}!")
|
||||||
|
|
||||||
log.debug(f"Updating last_sync value of {self!r}")
|
log.debug(f"Updating last_sync value of {self!r}")
|
||||||
self.last_sync = datetime.datetime.now()
|
self.last_sync = timezone.now()
|
||||||
self.save()
|
self.save()
|
||||||
log.info(f"Finished syncing DataFlows of {self!r}")
|
log.info(f"Finished syncing DataFlows of {self!r}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue