Is new DateTime(Object) buggy? (vs DateTime.parse(String))

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Is new DateTime(Object) buggy? (vs DateTime.parse(String))

datakey
As I asked in stackoveflow, I wanted to know which was a better way to construct a DateTime from a XML xs:dateTime format.

Sergiu Dumitriu replyed that new DateTime(Object), using String as argument, is buggy, because doesn't parse the timezone.
Is that a design decition or a bug?

Thanks,
--
Lucas



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Joda-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/joda-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is new DateTime(Object) buggy? (vs DateTime.parse(String))

jodastephen
Its not a bug, just a choice, and one that can't be changed now for
backwards compatibility.

The parse() method is much more accurate about hwo it works and what it does.

Stephen


On 3 September 2012 08:14, Luc <[hidden email]> wrote:

> As I asked in stackoveflow, I wanted to know which was a better way to
> construct a DateTime from a XML xs:dateTime format.
>
> Sergiu Dumitriu replyed that new DateTime(Object), using String as argument,
> is buggy, because doesn't parse the timezone.
> Is that a design decition or a bug?
>
> Thanks,
> --
> Lucas
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Joda-interest mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Joda-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/joda-interest
Loading...