Why is Redshift GETDATE() is returning in local timezone?
NickName:Mikey Ask DateTime:2016-08-30T06:25:56

Why is Redshift GETDATE() is returning in local timezone?

Our Redshift cluster seems to be returning timestamps in the local timezone (Pacific/Auckland) instead of UTC even though the AWS docs say:

GETDATE returns the current date and time in UTC

eg:

select GETDATE();

2016-08-30 10:22:18.000000

should return:

2016-08-29 22:22:18.000000

Copyright Notice:Content Author:「Mikey」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/39216112/why-is-redshift-getdate-is-returning-in-local-timezone

More about “Why is Redshift GETDATE() is returning in local timezone?” related questions

Why is Redshift GETDATE() is returning in local timezone?

Our Redshift cluster seems to be returning timestamps in the local timezone (Pacific/Auckland) instead of UTC even though the AWS docs say: GETDATE returns the current date and time in UTC eg:

Show Detail

Redshift jdbc driver getdate() returns time in server time zone instead of in UTC

The java code mentioned below was working fine with Redshift jdbc driver 1.2. But, now seeing erroneous behaviour with Redshift jdbc driver 2.1. Can anyone confirm whether a workaround is possible in

Show Detail

Different Time Stamps in Redshift

Please help me know difference in following SQL statements in Amazon Redshift: - extract(epoch from trunc(convert_timezone('Asia/Calcutta', getDate()) - 27) )::big...

Show Detail

redshift convert_timezone does not work

When running Redshift queries using Razor SQL, UTC dates appear to be treated as being in the local timezone, complete with daylight saving times. For example, running SELECT 'first',CONVERT_TIME...

Show Detail

Redshift: Combining GETDATE and Interval function

I want to only pull results that correspond to todays date. I am new to Redshift but am familiar with MYSQL. The closest I can get is 24 hours but I would prefer to use only data from today, I have...

Show Detail

twitter bootstrap datetimepicker not returning correct UTC Datetime by getDate function

I am using the latest bootstrap datetimepicker downloaded from here however facing issue in getting correct UTC datetime when using the API. var dateTimePicker = jQuery('.datetimepicker').datetime...

Show Detail

Timezone issues with Redshift COPY from Parquet

I am loading a Parquet file into Redshift. The Parquet file has a timestamp column. Question: Is there any way to specify what timezone to use as context when converting the Parquet timestamp (a

Show Detail

PHP getdate with timestamp ,how to set timezone?

I know that this has been asked but my problem is little different i think.. I get the response from a WCF JSON web service.. $reservation->ChIn=substr($reservation->ChIn,6,-10); This extra...

Show Detail

Why Fullcalendar getDate method returns time in GMT+0000 timezone?

My timezone is GMT+0200 and my actual hour in my timezone is 13:02. Although in Fullcalendar running this code: $('#owner-calendar').fullCalendar('getDate').toString(); I receive that: "Fri Sep 22

Show Detail

Redshift problem with getdate() being cached across multiple procedure calls

I would like have timestamp along execution of a procedure, im using GETDATE() but calling procedure a 2nd, 3rd etc times, keeps returning same timestamps, seems redshift doing some sort of caching...

Show Detail