Earlier today, I saw on Lemmy that comments made within the last hour since DST were now in the negatives since time had rolled back. If a database uses time like this for search operations, would that interfere with them? Could it corrupt the database?

you are viewing a single comment's thread
view the rest of the comments
[–] 100 points 6 days ago* (last edited 5 days ago) (4 children)

It depends on the database. But it's common practice to store values in UTC, which doesn't have DST, and only display in the user's timezone. What you saw was probaby only a bug on the front end, but not database corruption.

  • source
  • hideshow 4 child comments
  • [–] 22 points 5 days ago (3 children)

    Or just Unix (epoch) time.

    https://en.wikipedia.org/wiki/Unix_time

    There can be problems with leap seconds using UTC (or leap hours eventually)

    https://en.wikipedia.org/wiki/Leap_second

  • source
  • parent
  • hideshow 3 child comments