News for hackers. Stuff that matters.
Re:What's New in SQLite 3.35 by rover0 on Friday March 12, 2021 @07:54PM (#26442852)
Without a timezone the time is meaningless for many purposes.
Re:What's New in SQLite 3.35 by pupdogg on Friday March 12, 2021 @08:11PM (#26442973)
We store 8 million transactions a day in UTC...customer time zone is merely an integer offset stored alongside...simple and easy, what’s wrong with that?
Re:What's New in SQLite 3.35 by Osiris on Friday March 12, 2021 @09:14PM (#26443291)
The customer's offset is always changing but I assume you mean you're storing the offset as it was at the moment of the transaction.

How do you deal with the twice a year time offsets when a transaction occured first but shows up after because the clock rolled back an hour?

Isn't it generally better to store to the full timezone like America/New_York?

Re:What's New in SQLite 3.35 by pupdogg on Friday March 12, 2021 @09:39PM (#26443396)
For daylight savings, the offset is generated in real-time in our app at the time of transaction and then stored inside the db...so if 2x TXs occurred in CST at 1:58am (1 before and 1 after DST went into effect at 2am) they would both show up as being between 1-2am on the day of time change. However, the spike in data would show the anomaly for our use case. For a more mission critical app, you could have an additional tinyint field that would get set as 1 for all transactions that occurred in these transitional periods to be able to show data with or without the daylight savings.