buffalo icon indicating copy to clipboard operation
buffalo copied to clipboard

setting a time zone for default time stamps

Open scottywm opened this issue 3 years ago • 0 comments

Hello, i am needing a way to set the default time stamp in my migrations table so I hav the below example where i have a column called "time_test" and its default value is the time the row is created.

create_table("users") { t.Column("id", "bigint", {primary: true}) t.Column("user_name", "varchar(20)") t.Column("password", "varchar") t.Column("time_test", "timestamp", {"default": "now"}) }

i need a way to set this time zone for this column to UTC, How do I do it?

Thanks

Scott

scottywm avatar Jul 30 '22 09:07 scottywm