Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIMESTAMP is not in the SQLite3 specification #44

Closed
tredoe opened this issue Mar 9, 2013 · 1 comment
Closed

TIMESTAMP is not in the SQLite3 specification #44

tredoe opened this issue Mar 9, 2013 · 1 comment

Comments

@tredoe
Copy link

tredoe commented Mar 9, 2013

The type "TIMESTAMP" has been added to this driver but it does not follows the SQLite3 specification (http://sqlite.org/datatype3.html):

1.2 Date and Time Datatype

SQLite does not have a storage class set aside for storing dates and/or >times. Instead, the built-in Date And Time Functions of SQLite are capable of storing dates and times as TEXT, REAL, or INTEGER values:

TEXT as ISO8601 strings ("YYYY-MM-DD HH:MM:SS.SSS").
REAL as Julian day numbers, the number of days since noon in Greenwich on November 24, 4714 B.C. according to the proleptic Gregorian calendar.
INTEGER as Unix Time, the number of seconds since 1970-01-01 00:00:00 UTC.

Applications can chose to store dates and times in any of these formats and freely convert between formats using the built-in date and time functions.

This is an important issue because the SQL code used in Go with this driver would not be valid in others drivers that have followed the specification.

@mattn
Copy link
Owner

mattn commented Oct 24, 2014

Closed by #155

@mattn mattn closed this as completed Oct 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants