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
9e746c13
Kaydet (Commit)
9e746c13
authored
Agu 12, 2014
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Stopped stripping microseconds with MySQL backend
Refs #19716.
üst
ae7cb992
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
base.py
django/db/backends/mysql/base.py
+2
-9
1.8.txt
docs/releases/1.8.txt
+8
-0
No files found.
django/db/backends/mysql/base.py
Dosyayı görüntüle @
9e746c13
...
...
@@ -364,8 +364,7 @@ class DatabaseOperations(BaseDatabaseOperations):
else
:
raise
ValueError
(
"MySQL backend does not support timezone-aware datetimes when USE_TZ is False."
)
# MySQL doesn't support microseconds
return
six
.
text_type
(
value
.
replace
(
microsecond
=
0
))
return
six
.
text_type
(
value
)
def
value_to_db_time
(
self
,
value
):
if
value
is
None
:
...
...
@@ -375,13 +374,7 @@ class DatabaseOperations(BaseDatabaseOperations):
if
timezone
.
is_aware
(
value
):
raise
ValueError
(
"MySQL backend does not support timezone-aware times."
)
# MySQL doesn't support microseconds
return
six
.
text_type
(
value
.
replace
(
microsecond
=
0
))
def
year_lookup_bounds_for_datetime_field
(
self
,
value
):
# Again, no microseconds
first
,
second
=
super
(
DatabaseOperations
,
self
)
.
year_lookup_bounds_for_datetime_field
(
value
)
return
[
first
.
replace
(
microsecond
=
0
),
second
.
replace
(
microsecond
=
0
)]
return
six
.
text_type
(
value
)
def
max_name_length
(
self
):
return
64
...
...
docs/releases/1.8.txt
Dosyayı görüntüle @
9e746c13
...
...
@@ -160,6 +160,14 @@ Cache
* The ``incr()`` method of the
``django.core.cache.backends.locmem.LocMemCache`` backend is now thread-safe.
Database backends
^^^^^^^^^^^^^^^^^
* The MySQL backend no longer strips microseconds from ``datetime`` values as
MySQL 5.6.4 and up supports fractional seconds depending on the declaration
of the datetime field (when ``DATETIME`` includes fractional precision greater
than 0).
Email
^^^^^
...
...
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