8000 django: casting DateField to DateTimeField adds an unexpected hour · Issue #260 · googleapis/python-spanner-django · GitHub
[go: up one dir, main page]

Skip to content
django: casting DateField to DateTimeField adds an unexpected hour #260
Open
@timgraham

Description

@timgraham
======================================================================
FAIL: test_cast_from_db_date_to_datetime (db_functions.comparison.test_cast.CastTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/db_functions/comparison/test_cast.py", line 89, in test_cast_from_db_date_to_datetime
    self.assertEqual(dtm.start_as_datetime, datetime.datetime(2018, 9, 28, 0, 0, 0, 0))
AssertionError: datetime.datetime(2018, 9, 28, 7, 0) != datetime.datetime(2018, 9, 28, 0, 0)

SQL:

SELECT ... CAST(db_functions_dtmodel.start_date AS TIMESTAMP) AS start_as_datetime
FROM db_functions_dtmodel

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: spannerIssues related to the googleapis/python-spanner-django API.blockedIssues that cannot be implemented because of some limitdjango-test-suitepriority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.we-cannot-typecheck-spanner-columnswontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0