Ben,

you're right. I was trying to find a solution that simulates the
behaviour of Oracle's ERROR_ON_OVERLAP_TIME setting. Is there a way to
detect that no timezone information was provided?

Regards,
Mo.

On 11/1/07, Ben Kovitz <[EMAIL PROTECTED]> wrote:
> Would it be better to throw an exception because the time string is
> invalid?
>
> If I understand things correctly, a date string can only be ambiguous if
> it leaves out the time zone.  For example, "2007-Nov-04 01:30 PDT" is
> unambiguous.  It's the exact same time as "2007-Nov-04 00:30 PST".
>
> Isn't it a mistake to use "(Europe/Berlin)" in a time string, because
> Europe/Berlin specifies a *rule* for switching between daylight savings
> time and standard time, not a specific time zone?
>
> Ben
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Stephen Colebourne
> Sent: Monday, October 29, 2007 5:31 AM
> To: Discussion of the Joda project
> Subject: Re: [Joda-interest] Detect ambigious time when DST changes
>
> No there is no such method, or easy way at present. Sounds like a good
> idea though.
>
> (Implementing it involves working out how close the instant is to the
> DST transition as returned by DateTimeZone.nextTransition)
>
> Stephen
>
> Moritz Petersen wrote:
> > Hello everyone,
> >
> > is there a simple and effective way to detect ambigious time when
> > changing from DST back to standard time?
> >
> > For example:
> >
> > 28.10.2007 01:30 (Berlin/Germany)
> >
> > exists twice, once with DST and once at standard time. I would like to
> > have something like:
> >
> > DateTime dt = new DateTime("28.10.2007 01:30"); // forget the syntax
> > of the parameter it's just for demonstration.
> >
> > if (dt.isAmbigous()) {
> >     warning("Please provide timezone and DST information");
> > }
> >
> > Any advice?
> >
> > Thank you,
> > Moritz.
> >
> >
> ------------------------------------------------------------------------
> -
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?  Stop.
> > Now Search log events and configuration files using AJAX and a
> browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Joda-interest mailing list
> > Joda-interest@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/joda-interest
> >
>
> ------------------------------------------------------------------------
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to