Skip to content

datastore.Datetime.now seems broken #6

@jgeewax

Description

@jgeewax

When running this method locally (on a Mac) it returns 14th of January 1970 (1970-01-14T10:49:17.451+01:00)

I suspect that the problem is that it is implemented as:

public static DateTime now() {
  return new DateTime(System.nanoTime() / 1000L);  // nanoTime() may be the culprit?
}

Metadata

Metadata

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