Fascinating.  

What is the Operating System and Version (eg Linux <kernel version> 
<distribution name> <distribution version> or Windows <version> <build>); 
SQLite version; interface (C or .snot)?  

Does this only affect trips through the platform localtime function within 
SQLite (that is, if you store GMT/UTC by leaving out the 'localtime' modifier) 
do you still get regionalized formatting coming back?

Or are you providing a misformed timestamp produced by some regional aware 
function (ie, not forcing a format/region override when retrieving the 
timestamp-string -- which is a pretty common application level error in my 
experience)?

Note that I cannot get the builtin 'now' or 'localtime' modifiers to return an 
inconsistent (regionalized) format, but I haven't tried real hard either.

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.


>-----Original Message-----
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Rajat Pal
>Sent: Thursday, 2 November, 2017 06:24
>To: sqlite-users@mailinglists.sqlite.org
>Cc: Joy George Chittilapailly; Minghua Feng; Rohit Udasi
>Subject: [sqlite] SQLite DB - DateTime field values are not
>consistent
>
>Hi Team,
>
>
>
>We have identified an issue with SQLite database which seems to be a
>potential bug.
>
>
>
>In SQLite database, All the values of datetime fields are saved as
>text without any format check. We can save any text value in the
>datetime column. This behavior is creating problem for us because for
>different regional settings,  datetime values are getting saved in
>different format.
>
>
>
>For example, if the regional format is English(United States), the
>value is saved as "2017-09-21 00:00:00" but if the regional format is
>Finnish(Finland), the value is saved as "2017-10-27 00.00.00". So
>some dates have colon(:) as time separator and some dates have dot
>(.) as time separator.
>
>
>
>Below query can illustrate the problem:
>
>
>
>Create Table Table1(TestDate DATETIME);
>
>
>
>Insert Into Table1 values (datetime('now','localtime'));
>
>
>
>insert into Table1 values ("2017-11-01 17:31:41");
>
>
>
>insert into Table1 values ("2017-11-01 17.32.41");
>
>
>
>insert into Table1 values ("Testing");
>
>
>
>select * from Table1;
>
>
>
>Can you please let us know if there is any way we can force the
>datetime field to have the datetime values in same format only.
>
>
>
>Regards,
>
>Rajat Pal
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to