Hi Peter,

On 14 May 2012 20:49, Peter Bigot <big...@acm.org> wrote:
> I'm not sure.  As you saw, http://www.w3.org/TR/xmlschema-2/#dateTime
> is pretty clear that anything that had a timezone is to be treated as
> UTC.  If the original lexical space didn't have a timezone, I think I
> set it up to be given the local timezone; it might be argued that that
> is a mistake, but it might also have been necessary for consistency.
>
> If you would file this as a trac request I'll see what I can do.
> Please make it clear whether you just want xsd.dateTime.now() to be
> symmetrical or whether you need values that lack a timezone to do
> something other than what they do now.

I'll create some more test cases in both PyXB and JAXB and get back to you.

I think the assumption that a dateTime without a timezone is in local
time is a good one, and I believe it will break JAXB compatibility if
that were changed (but I'll test this). The one that concerns me at
the moment is when there *is* a timezone - if you print a
pyxb.binding.datatypes.dateTime, or save one of them to a TIMESTAMP
field in the database (which PostgreSQL silently defaults to "WITHOUT
TIMEZONE"), you'll end up with timestamps being printed and stored to
the database in GMT.

But like I say, I need to do some more test cases to figure out what I
think the right way to handle it is.

Regards,
Nathan.

------------------------------------------------------------------------------
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/
_______________________________________________
pyxb-users mailing list
pyxb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyxb-users

Reply via email to