## Re: Time problem again?

From: Richard Huxton Bjørn T Johansen Postgres General Re: Time problem again? 2003-09-30 08:42:39 200309300942.39576.dev@archonet.com (view raw or whole thread) 2003-09-29 09:11:55 from Bjørn T Johansen  2003-09-29 11:21:33 from Richard Huxton   2003-09-29 11:26:41 from Bjørn T Johansen    2003-09-29 11:40:25 from Richard Huxton     2003-09-29 11:47:36 from Bjørn T Johansen      2003-09-29 13:22:23 from Richard Huxton       2003-09-29 19:19:42 from Bjørn T Johansen        2003-09-29 19:38:25 from Tom Lane         2003-09-29 20:33:42 from Bjørn T Johansen        2003-09-29 19:53:05 from Richard Huxton         2003-09-29 20:31:31 from Bjørn T Johansen          2003-09-30 07:40:00 from Richard Huxton           2003-09-30 08:00:25 from Bjørn T Johansen            2003-09-30 08:42:39 from Richard Huxton             2003-09-30 08:50:21 from Bjørn T Johansen              2003-09-30 09:24:53 from Richard Huxton               2003-09-30 09:54:37 from Bjørn T Johansen            2003-09-30 09:13:04 from Karsten Hilbert  2003-09-29 11:44:48 from "Daniel Schuchardt"   2003-09-29 11:49:16 from Bjørn T Johansen pgsql-general
```On Tuesday 30 September 2003 09:00, Bjørn T Johansen wrote:
> Why can't you just take my word for it, this is the way it should be
> sorted....

I'm happy to take your word, but until I can figure out what rules you're
using I can't suggest anything. You clearly know what you want, but I can't
get to grips with precisely what that is.

> The reason I know this, is because the timespan, as I have mention
> before, from first record to last record is always less than 12 hours.
> i.e the span from 0200 to 2200 is 20 hours, i.e. 2200 comes before 0200!

Ah - you said 24 hours originally, which means that all the examples we've
looked at were valid. Apologies if I missed the 12-hour bit.

So - your rule is something like:

For some block of times...
IF max(my_time) - min(my_time) > 12 hours
THEN sort "through midnight"
ELSE sort "naturally"

Which is what Tom said (I was wondering where he got his 12 hours from).
Have I got that right?

--
Richard Huxton
Archonet Ltd

```

### pgsql-general by date

 Next: From: Angel Todorov Date: 2003-09-30 08:43:19 Subject: pg_hba.conf Previous: From: Bjørn T Johansen Date: 2003-09-30 08:00:25 Subject: Re: Time problem again?