Re: locations of DST information
Re: locations of DST information
- Subject: Re: locations of DST information
- From: Chuck Hill <email@hidden>
- Date: Mon, 28 Jan 2008 11:38:04 -0800
Hi Pierre
On Jan 28, 2008, at 10:56 AM, Mr. Pierre Frisch wrote:
Thanks, but I think it would be going backwards. The current
NSTimestampFormatter is already a thin layer on top of
SimpleDateFormat using NSTimeZone instead of TimeZone with some
bizarre adjustments to make it behave like the ObjC formatter.
Do you recall specifically what is different?
Some of the format characters are just ignored as they do not have
a correspondent in SimpleDateFormat. The next version of WebObjects
will not use NSTimestampFormatter internally. You can write a
translator but you are going to incur a performance penalty for
very little gain.
Would it not be a good thing to make NSTimestampFormatter an even
thinner wrapper (sub-class?) that just translates the
NSTimestampFormatter format symbols to the SimpleDateFormat one.
Don't forget that you should not cache format as they are not re-
entrant.
Is NSTimestampFormatter re-entrant? I have always created and
cached them at the Application level. The format is never changed
after creation. I have never noticed any problems under load. If
NSTimestampFormatter is re-entrant and SimpleDateFormat is not, that
is rather more of change.
Most WO developer do not embed their format string in every
component anyway it is way too cumbersome when the customer
invariably ask for a change, we all push them in cover methods in
WOComponent so moving away from the old format should not be that
difficult.
Like Mike, I am not so confident that most WO developers don't do
this. I know I did for a long time. Now, having more sense, I keep
them in a properties file and use the formatter binding rather than
the format binding. I would bet that there is a lot of code out
there that does use the format binding.
Having NSTimestampFormatter as a "symbol translating sub-class" would
ease the pain of transition for many.
Chuck
On Jan 28, 2008, at 9:30, Mike Schrag wrote:
I mean for Pierre, inside WO, or Wonder with a class replacement
if it ends up going away completely ...
ms
On Jan 28, 2008, at 12:18 PM, Anjo Krank wrote:
Not really. You'd need to get it plugged into the system, see if
it works with all the components and so on. So this is not an
hour or two of work.
Cheers, Anjo
Am 28.01.2008 um 18:05 schrieb Mike Schrag:
It should be really easy to write a new NSTimestampFormatter
that just converts old format to SimpleDateFormat format
internally, right? So NSTimestampFormatter could be deprecated
but not gone. I actually wrote this code last year but I think
I ended up tossing it, and I don't recall why. No idea where it
ran off to, but it was maybe an hours worth of code, and another
that because you have to keep looking back and forth between the
two references. IIRC there were two %things that didn't have an
equivalent in SimpleDateFormat.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden