Graphcool / graphcool-framework

Apache License 2.0
1.78k stars 130 forks source link

[Feature] CreatedAt and UpdatedAt in UTC #492

Closed Kisepro closed 6 years ago

Kisepro commented 6 years ago

What feature are you missing? Be able to configure the auto-generated field CreatedAt and UpdatedAt in UTC instead of localtime

How could this feature look like in detail? Tradeoffs? We could maybe use something like

type Message @model{
  id: ID! @isUnique
  createdAt: DateTime! @useLocalTime(value: false)
  text: String
}

Auto-generated date fields are really useful but for cross time zone app, it's totally useless while the local time is used.

Kisepro commented 6 years ago

Can be closed :

Answer there : https://www.graph.cool/forum/t/createdat-and-updatedat-automatic-datetime-field-in-utc/2617/3