Skip to content
Discussion options

You must be logged in to vote
SELECT 
    x,
    timezone('Etc/GMT+6', x) AS localtime,
    localtime::DATE AS localdate,
FROM T 
ORDER BY x 
LIMIT 10;
┌──────────────────────────┬─────────────────────┬────────────┐
│            x             │      localtime      │ localdate  │
│ timestamp with time zone │      timestamp      │    date    │
├──────────────────────────┼─────────────────────┼────────────┤
│ 2015-03-07 00:00:00+00   │ 2015-03-06 18:00:00 │ 2015-03-06 │
│ 2015-03-07 01:00:00+00   │ 2015-03-06 19:00:00 │ 2015-03-06 │
│ 2015-03-07 02:00:00+00   │ 2015-03-06 20:00:00 │ 2015-03-06 │
│ 2015-03-07 03:00:00+00   │ 2015-03-06 21:00:00 │ 2015-03-06 │
│ 2015-03-07 04:00:00+00   │ 2015-03-06 22:00:00 │ 2015-03-06 │…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@soerenwolfers
Comment options

@Kodiologist
Comment options

@soerenwolfers
Comment options

@soerenwolfers
Comment options

@Kodiologist
Comment options

Answer selected by Kodiologist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants