Re: new java date query
- From: Roedy Green <my_email_is_posted_on_my_website@xxxxxxxxxxxxxx>
- Date: Fri, 07 Apr 2006 22:57:14 GMT
On Fri, 07 Apr 2006 22:35:45 GMT, Patricia Shanahan <pats@xxxxxxx>
wrote, quoted or indirectly quoted someone who said :
1. Deals that had that start date in the analyst's timezone.
2. Deals that had that start date in the home timezone of the business.
3. Deals that had that start date in the timezone in which the deal was
made.
You can sidestep some of this complexity by getting rid of the time
and storing a pure date. Christmas is on Dec 25. The floral society
meets the third Tuesday of each month.... It has nothing to do with
timezones. The deal was signed as 2006-01-31. It is still binding no
matter what the timezone.
Where do these pure dates come from?
1. they may be entered by humans as yyyy-mm-dd having whatever meaning
they assign to them, typically the date in the timezone the deal was
signed.
2. You get them by considering the date of a timestamp at Greenwich.
3. You get hem by considering the date of a timestamp at the location
it was entered.
This is how BigDate works. I have found that perhaps 90% of date
calculations are simplified by getting rid of the time and timezone
before you do your calculations. If the result does not depend on
them, they just trip you up.
Further you can store a pure date in 16 or 32 bits quite neatly. For a
timestamp you need 64.
On the other hand, capturing raw data and storing it as UTC timestamps
means you have unabiguously nailed precisely when the event occurred.
So long as you get that right initially, you can then display it in
any form that people find convenient, even if something as goofy as
retroactive daylight saving were announced.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.
- Follow-Ups:
- Re: new java date query
- From: Big Jim
- Re: new java date query
- From: P.Hill
- Re: new java date query
- References:
- new java date query
- From: Big Jim
- Re: new java date query
- From: Patricia Shanahan
- new java date query
- Prev by Date: Re: Why no existing Java type to existing XML schema binding support?
- Next by Date: Re: XML Not good for Big Files (vs Flat Files)
- Previous by thread: Re: new java date query
- Next by thread: Re: new java date query
- Index(es):
Relevant Pages
|