GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — datetime property · Issue #50 · googleapis/google-cloud-python

datetime property #50

New issue
Copy link
New issue
Copy link
Closed
#53
Closed
datetime property#50
#53
Copy link
Assignees
jgeewax
Labels
🚨This issue needs some love.api: datastoreIssues related to the Datastore API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@albertog
albertog
opened on Feb 24, 2014
Issue body actions

I not sure is it is a bug but when I have tried save() a entity with a datetime property appear this error.

pb_attr, pb_value = helpers.get_protobuf_attribute_and_value(value)
File "/usr/local/lib/python2.7/dist-packages/gcloud/datastore/helpers.py", line 39, in get_protobuf_attribute_and_value
name, value = 'timestamp_microseconds', time.mktime(val.timetuple())
NameError: global name 'time' is not defined

Activity

Next
  1. jgeewax
    added a commit that references this issue on Feb 25, 2014

    Fix googleapis#50 - Missing time import.

    This issue will close once commit f6979f5 is merged into the 'master' branch.
    f6979f5
  2. jgeewax commented on Feb 25, 2014

    @jgeewax
    jgeewax
    on Feb 25, 2014
    Contributor
    More actions

    It definitely is a bug -- just a missing import.

    I just created a pull request that fixes the import and adds tests so this shouldn't happen again.

  3. jgeewax
    added
    bug
    on Feb 25, 2014
  4. jgeewax
    closed this as completedin #53on Feb 25, 2014
  5. jgeewax
    added a commit that references this issue on Feb 25, 2014

    Merge pull request #53 from jgeewax/datastore-helper-missing-import

    This issue will close once commit 2c26d9b is merged into the 'main' branch.
    2c26d9b
  6. albertog commented on Feb 26, 2014

    @albertog
    albertog
    on Feb 26, 2014
    Author
    More actions

    I have tried but seems there are other issue, when saving datat

    toy.update({'name': 'Toy', 'some_int_value': 1234, 'fecha': datetime(2014,12,1,23,59,59)})

    ---- tracer
    File "gcloud/datastore/entity.py", line 182, in save
    properties=dict(self))
    File "gcloud/datastore/connection.py", line 344, in save_entity
    setattr(prop.value, pb_attr, pb_value)
    File "/usr/local/lib/python2.7/dist-packages/google/protobuf/internal/python_message.py", line 454, in setter
    type_checker.CheckValue(new_value)
    File "/usr/local/lib/python2.7/dist-packages/google/protobuf/internal/type_checkers.py", line 104, in CheckValue raise TypeError(message)
    TypeError: 1417474799.0 has type --type 'float'--,
    but expected one of: (--type 'int', --type 'long'--)

  7. jgeewax
    added 4 commits that reference this issue on Feb 27, 2014

    Fixed googleapis#50 - timestamps need to be int/long, not float.

    This issue will close once commit 85eff05 is merged into the 'master' branch.
    85eff05

    Fixed googleapis#50 - timestamps need to be int/long, not float.

    This issue will close once commit d3f5b1b is merged into the 'master' branch.
    d3f5b1b

    Fixed googleapis#50 - timestamps need to be int/long, not float.

    This issue will close once commit ba56882 is merged into the 'master' branch.
    ba56882

    Fixed googleapis#50 - timestamps need to be int/long, not float.

    This issue will close once commit d4d9669 is merged into the 'master' branch.
    d4d9669
  8. jgeewax
    added 3 commits that reference this issue on Mar 8, 2014

    Fixed googleapis#50 - timestamps need to be int/long, not float.

    This issue will close once commit fef9d79 is merged into the 'master' branch.
    fef9d79

    Fixed googleapis#50 - timestamps need to be int/long, not float.

    This issue will close once commit 8a0b8cd is merged into the 'master' branch.
    8a0b8cd

    Merge pull request #55 from jgeewax/datetime-fix-again

    This issue will close once commit bc0c1fd is merged into the 'main' branch.
    bc0c1fd
  9. jgeewax
    added this to the This milestone has been deleted milestone on Jan 30, 2015
  10. 90 remaining items

  11. parthea
    added 11 commits that reference this issue on Nov 24, 2025

    docs: linkify pypi badge (#50)

    a18b9a2

    feat: allow credentials files to be passed for channel creation (#50)

    a436d91

    chore(main): release 0.2.0 (#50)

    3e8ab78

    Merge pull request #50 from jcampbell/fix/types_export

    8c2abae

    chore: add config / docs for 'pre-commit' support (#50)

    d26f9c3

    feat: pass 'client_options' to base class ctor (#60)

    cf25c04

    chore: add library type to .repo-metadata.json (#50)

    e9b98ce

    feat: Add `entities_to_dict()` and `entities_to_bigquery()` to `Docum…

    7f07b90

    chore: add config / docs for 'pre-commit' support (#50)

    25474da

    chore: release 1.15.1 (#50)

    073f6d5

    Implement namespace for queries. (#50)

    b3da65b
  12. parthea
    added 4 commits that reference this issue on Mar 2, 2026

    Always use raw response data. (#87)

    This issue will close once commit a7e26d1 is merged into the 'main' branch.
    a7e26d1

    dbapi,django: generate missing ids + fix SQL alter statements

    This issue will close once commit cd4711e is merged into the 'main' branch.
    cd4711e

    fix: use INT64 type for empty sets with no type (#50)

    This issue will close once commit 7b26b4d is merged into the 'main' branch.
    7b26b4d

    docs: re-pin sphinx version (#70)

    This issue will close once commit 92357b9 is merged into the 'main' branch.
    92357b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @jgeewax
    jgeewax

Labels

🚨This issue needs some love.api: datastoreIssues related to the Datastore API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.