Since the column is timestamp rather than 'timestamp with timezone' Presto assumes the value is in the server's local timezone.
One solution is to set the Presto server's timezone to UTC and let it convert the timestamp column to the client's timezone automatically.
Another option, if you know the difference between the stored timezone and your local timezone, is to convert the value using interval:
presto:default> select * from test_timestamp;
c1
-------------------------
2014-02-28 08:09:58.000
(1 row)
Query 20170209_143342_00014_shgr3, FINISHED, 1 node
Splits: 17 total, 17 done (100.00%)
0:01 [1 rows, 157B] [1 rows/s, 189B/s]
presto:default> select c1 - interval '8' hour from test_timestamp;
_col0
-------------------------
2014-02-28 00:09:58.000
(1 row)
Query 20170209_143348_00015_shgr3, FINISHED, 1 node
Splits: 17 total, 17 done (100.00%)
0:01 [1 rows, 157B] [0 rows/s, 141B/s]
--
You received this message because you are subscribed to the Google Groups "Presto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
presto-users...@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout.