Skip to content

Instantly share code, notes, and snippets.

@iamedu
Created August 29, 2016 01:06
Show Gist options
  • Save iamedu/7ded1fc8946aa9261fbe0c3bd2ab9069 to your computer and use it in GitHub Desktop.
Save iamedu/7ded1fc8946aa9261fbe0c3bd2ab9069 to your computer and use it in GitHub Desktop.
Postgres start of day in custom timezone
select to_date(to_char(current_timestamp AT TIME ZONE 'America/Mexico_City', 'YYYY-MM-dd'), 'YYY-MM-DD')::timestamp AT TIME ZONE 'America/Mexico_City';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment