Using LiteDAC 2.2.5 with Delphi Xe2
I'm modifying an app and having an issue where SQLite DateTime fields are being displayed in GMT instead of localtime.
It does this whether I have LiteDAC connected 'direct' or not.
How do I fix it so that the localtime is what is displayed when retrieving the field data (for example for use in a label) or when displayed in a DBGrid?
UPDATE:
I've got a better understanding of what's going on.
The dates are not being recorded as local DateTime because the database covers several timezones so what is showing is correct. However for the enduser interface I need to be able to display the datetime info in the localtime format.
DateTime is displayed in GMT instead of localtime...
Re: DateTime is displayed in GMT instead of localtime...
Hello,
To display date as localtime, you can explicitly map the field to localtime in the query, for example:
To display date as localtime, you can explicitly map the field to localtime in the query, for example:
Code: Select all
select datetime(date('now'), 'localtime')