mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-12-29 00:22:03 +00:00
use new datetime format
This commit is contained in:
parent
3f5f72a78d
commit
e98eb5c3c1
4
.gitignore
vendored
4
.gitignore
vendored
@ -69,4 +69,6 @@ docker-compose.yml
|
||||
*.zip
|
||||
rsyncd.passwd
|
||||
|
||||
node_modules/
|
||||
node_modules/
|
||||
update.sh
|
||||
ssh.sh
|
||||
|
@ -11,7 +11,7 @@ class JSONField(serializers.Field):
|
||||
|
||||
class DateTimeTZField(serializers.DateTimeField):
|
||||
def to_representation(self, value):
|
||||
self.format = "%Y-%-m-%d %-H:%-M:%-S"
|
||||
self.format = "%Y-%-m-%d %H:%M:%S"
|
||||
value = timezone.localtime(value)
|
||||
return super(DateTimeTZField, self).to_representation(value)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user