Functions receiving argument of type timezone.

Started by Joshua Moore-Olivaabout 23 years ago3 messagesgeneral
Jump to latest
#1Joshua Moore-Oliva
josh@chatgris.com

The problem I am having is that a function with the definition

loctolisttime(timestamp, interval, integer)

When I attempt to call that function with

timestamp 'now' AT TIME ZONE interval '0 hours' (I need to pass the current
time at gmt) I get the error.

ERROR: Function loctolisttime(timestamp with time zone, interval, integer)
does not exist Unable to identify a function that satisfies the given
argument types You may need to add explicit typecasts

when I pass it an argument from a field of a table which is of type timestamp,
it works fine...

any idea how I can get a UTC timestamp into that function?

Josh.

#2Joshua Moore-Oliva
josh@chatgris.com
In reply to: Joshua Moore-Oliva (#1)
Re: Functions receiving argument of type timezone-- more info

A list of possible solutions that I cna't figure out how to do..

a) Is there a way to declare a function accepting an argument of type
"timestamp with time zone"?

b) Is there a special function like utc_now, or CURRENT_UTC_TIMESTAMP or
something I could pass to the function?

Josh.

#3Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Joshua Moore-Oliva (#2)
Re: Functions receiving argument of type timezone-- more

On Thu, 13 Mar 2003, Joshua Moore-Oliva wrote:

A list of possible solutions that I cna't figure out how to do..

a) Is there a way to declare a function accepting an argument of type
"timestamp with time zone"?

You should just be able to declare the function saying the argument is
timestamp with time zone afaics. I tried in in 7.3.1 and 7.4 devel.