SQLite Forum

Feature request: pragma for changing the precision / format of CURRENT_TIMESTAMP to YYYY-MM-SSTHH:MM:SS.SSS
Login
The accuracy and precision of timestamps depends on the hardware and how the computer is connected to the reference time, irrespective of what the database system prints. At the home office a PC with configured NTP via WAN/internet the seconds are probably reliable, but not 100 ms. YYYY-MM-DD HH:MM:SS would be adequate. Higher accuracy is possible within a LAN where an accurate NTP server is running (universities, ...), in a mobile phone having GPS and an OS syncing to the system clock to the GPS reference, or with other special arrangements for time synchronization.

Even if a database system prints CURRENT_TIMESTAMP as YYYY-MM-DDTHH:MM:SS.SSS, this is not guaranteed to be a timestamp with millisecond accuracy and actually unlikely to be the case.