Timezones

Every Supabase database is set to UTC timezone by default. We strongly recommend keeping it this way, even if your users are in a different location. This is because it makes it much easier to calculate differences between timezones if you adopt the mental model that "everything in my database is in UTC time".

Change timezone#

1alter database postgres
2set timezone to 'America/New_York';

Full list of timezones#

Get a full list of timezones supported by your database. This will return the following columns:

  • name: Time zone name
  • abbrev: Time zone abbreviation
  • utc_offset: Offset from UTC (positive means east of Greenwich)
  • is_dst: True if currently observing daylight savings
1select name, abbrev, utc_offset, is_dst
2from pg_timezone_names()
3order by name;

Search for a specific timezone#

Use ilike (case insensitive search) to find specific timezones.

1select *
2from pg_timezone_names()
3where name ilike '%york%';