dbTalk Databases Forums  

Comment on timezone and interval types

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss Comment on timezone and interval types in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Stuart Bishop
 
Posts: n/a

Default Re: Comment on timezone and interval types - 11-05-2004 , 02:38 AM






-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bruno Wolff III wrote:
Quote:
On Fri, Oct 29, 2004 at 11:14:31 -0600,
Guy Fraser <guy (AT) incentre (DOT) net> wrote:

1 day should always be calculated as 24 hours, just as an hour
is calculated as 60 minutes...


If you want 24 hours you can use 24 hours. Days are not constant length,
just like months aren't constant length.
Days *are* of constant length - check your nearest dictionary, which
will define it as 24 hours or the period of rotation of the earth. If
people see 'day', they think '24 hours' because that is the definition
they have been using since preschool. This breeds sleeping bugs that
nobody notices until the DST transition kicks in and events happen an
hour late or not at all.

What you are talking about is useful, but should be called calendar_day
or something that makes it obvious that it isn't using the traditional
definition.

People are used to months being ambiguous so it is less likely to cause
upsets, although it still bites people because their toolkits definition
of 'month' does not match their business rules of 'month' (which might
be 30 days, 31 days, 4 weeks, calendar month rounded down).

- --
Stuart Bishop <stuart (AT) stuartbishop (DOT) net>
http://www.stuartbishop.net/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBizvxAfqZj7rGN0oRAqLAAJ9sNmXB/yv/P6saytH4qrPQ9xdwEACfX8I9
krauCgYalcWsW+7qiPymoYo=
=pMyc
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Reply With Quote
  #12  
Old   
Michael Glaesemann
 
Posts: n/a

Default Re: Comment on timezone and interval types - 11-05-2004 , 02:50 AM







On Nov 5, 2004, at 5:38 PM, Stuart Bishop wrote:

Quote:
Bruno Wolff III wrote:
| On Fri, Oct 29, 2004 at 11:14:31 -0600,
| Guy Fraser <guy (AT) incentre (DOT) net> wrote:
|
|>1 day should always be calculated as 24 hours, just as an hour
|>is calculated as 60 minutes...
|
|
| If you want 24 hours you can use 24 hours. Days are not constant
length,
| just like months aren't constant length.

Days *are* of constant length - check your nearest dictionary, which
will define it as 24 hours or the period of rotation of the earth. If
people see 'day', they think '24 hours' because that is the definition
they have been using since preschool. This breeds sleeping bugs that
nobody notices until the DST transition kicks in and events happen an
hour late or not at all.

What you are talking about is useful, but should be called calendar_day
or something that makes it obvious that it isn't using the traditional
definition.
Could you expand on this a bit? I'm not quite sure what you're getting
at. I think most people would say the period from noon one day until
noon the next would be 1 day. If that day spans a DST change, it will
definitely not be 24 hours, and people might agree if they're asked "is
the period from noon til noon over DST 24 hours?". They'd most likely
say no, I think. Yet, if they're asked if the same period is one day, I
think they'd answer yes. I think this is what Bruno is getting at.

Regards,

Michael Glaesemann
grzm myrealbox com


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html



Reply With Quote
  #13  
Old   
Tom Lane
 
Posts: n/a

Default Re: Comment on timezone and interval types - 11-05-2004 , 09:39 AM



Stuart Bishop <stuart (AT) stuartbishop (DOT) net> writes:
Quote:
| If you want 24 hours you can use 24 hours. Days are not constant length,
| just like months aren't constant length.

Days *are* of constant length - check your nearest dictionary, which
will define it as 24 hours or the period of rotation of the earth.
This is about as relevant to our problems as claiming that we should
ignore leap years because years are really of constant length.

We are trying to emulate the common civil calendar here, and in places
that observe DST, days are *not* of constant length. If you don't like
this, why are you using the timestamp-with-time-zone datatype (or at
least, why are you using it with a DST-aware zone setting)?

timestamp-without-time-zone will continue to behave as it always has,
so that seems to me to offer a sufficient out for people who really
truly do not want DST-aware calculations.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.