Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
6993f288
Kaydet (Commit)
6993f288
authored
Mar 21, 2014
tarafından
Aymeric Augustin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed typo in comments.
üst
051c666a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
__init__.py
django/db/backends/__init__.py
+1
-1
tests.py
tests/timezones/tests.py
+2
-2
No files found.
django/db/backends/__init__.py
Dosyayı görüntüle @
6993f288
...
@@ -442,7 +442,7 @@ class BaseDatabaseWrapper(object):
...
@@ -442,7 +442,7 @@ class BaseDatabaseWrapper(object):
class
BaseDatabaseFeatures
(
object
):
class
BaseDatabaseFeatures
(
object
):
allows_group_by_pk
=
False
allows_group_by_pk
=
False
# True if django.db.backend.utils.typecast_timestamp is used on values
# True if django.db.backend
s
.utils.typecast_timestamp is used on values
# returned from dates() calls.
# returned from dates() calls.
needs_datetime_string_cast
=
True
needs_datetime_string_cast
=
True
empty_fetchmany_value
=
[]
empty_fetchmany_value
=
[]
...
...
tests/timezones/tests.py
Dosyayı görüntüle @
6993f288
...
@@ -113,7 +113,7 @@ class LegacyDatabaseTests(TestCase):
...
@@ -113,7 +113,7 @@ class LegacyDatabaseTests(TestCase):
Event
.
objects
.
create
(
dt
=
dt
)
Event
.
objects
.
create
(
dt
=
dt
)
event
=
Event
.
objects
.
get
()
event
=
Event
.
objects
.
get
()
self
.
assertIsNone
(
event
.
dt
.
tzinfo
)
self
.
assertIsNone
(
event
.
dt
.
tzinfo
)
# django.db.backend.utils.typecast_dt will just drop the
# django.db.backend
s
.utils.typecast_dt will just drop the
# timezone, so a round-trip in the database alters the data (!)
# timezone, so a round-trip in the database alters the data (!)
# interpret the naive datetime in local time and you get a wrong value
# interpret the naive datetime in local time and you get a wrong value
self
.
assertNotEqual
(
event
.
dt
.
replace
(
tzinfo
=
EAT
),
dt
)
self
.
assertNotEqual
(
event
.
dt
.
replace
(
tzinfo
=
EAT
),
dt
)
...
@@ -139,7 +139,7 @@ class LegacyDatabaseTests(TestCase):
...
@@ -139,7 +139,7 @@ class LegacyDatabaseTests(TestCase):
Event
.
objects
.
create
(
dt
=
dt
)
Event
.
objects
.
create
(
dt
=
dt
)
event
=
Event
.
objects
.
get
()
event
=
Event
.
objects
.
get
()
self
.
assertIsNone
(
event
.
dt
.
tzinfo
)
self
.
assertIsNone
(
event
.
dt
.
tzinfo
)
# django.db.backend.utils.typecast_dt will just drop the
# django.db.backend
s
.utils.typecast_dt will just drop the
# timezone, so a round-trip in the database alters the data (!)
# timezone, so a round-trip in the database alters the data (!)
# interpret the naive datetime in local time and you get a wrong value
# interpret the naive datetime in local time and you get a wrong value
self
.
assertNotEqual
(
event
.
dt
.
replace
(
tzinfo
=
EAT
),
dt
)
self
.
assertNotEqual
(
event
.
dt
.
replace
(
tzinfo
=
EAT
),
dt
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment