Europe Pub
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
RSS Bot@lemmy.bestiver.seBM to Hacker News@lemmy.bestiver.seEnglish · 3 days ago

Footguns with Postgres "at time zone 'UTC'"

bookofrevenue.com

external-link
message-square
0
link
fedilink
  • cross-posted to:
  • programming@programming.dev
  • programming@lemmy.ml
1
external-link

Footguns with Postgres "at time zone 'UTC'"

bookofrevenue.com

RSS Bot@lemmy.bestiver.seBM to Hacker News@lemmy.bestiver.seEnglish · 3 days ago
message-square
0
link
fedilink
  • cross-posted to:
  • programming@programming.dev
  • programming@lemmy.ml
Postgres AT TIME ZONE 'UTC' does NOT do what you think it does
bookofrevenue.com
external-link
And why you may need to repeat AT TIME ZONE 'UTC' twice. SUMMARY * AT TIME ZONE 'UTC' converts the data type from timestamptz to timestamp (example). * Now you are inadvertently using the timestamp without time zone (aka timestamp) data type, which is markedly discouraged. * There are tons of footguns with timestamp. * For example, the equality of timestamp and timestamptz will always be false. * Adding a month with + INTERVAL '1 months' is timezone-dependent. If your product

Comments

alert-triangle
You must log in or # to comment.

Hacker News@lemmy.bestiver.se

hackernews@lemmy.bestiver.se

Subscribe from Remote Instance

You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !hackernews@lemmy.bestiver.se
lock
Community locked: only moderators can create posts. You can still comment on posts.

Posts from the RSS Feed of HackerNews.

The feed sometimes contains ads and posts that have been removed by the mod team at HN.

Source of the RSS Bot

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 378 users / day
  • 1.54K users / week
  • 2.22K users / month
  • 8.82K users / 6 months
  • 12 local subscribers
  • 5.46K subscribers
  • 45.1K Posts
  • 27.8K Comments
  • Modlog
  • mods:
  • patrick@lemmy.bestiver.se
  • RSS Bot@lemmy.bestiver.seB
  • BE: 0.19.18
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org