Boost logo

Boost Users :

Subject: [Boost-users] [datetime] to/from ISO
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2013-07-30 12:42:44


Hello,

I have a cross platform date/time quirk I want to work out.

I am using Boost DateTime Posix to_iso_string and from_iso_string to
pass date/time fields over the wire.

What I am finding is that C# .NET DateTime and/or Boost DateTime Posix
ISO do not agree, at least where ISO format is concerned.

So... Is it a Boost issue? Or a .NET issue? I'm not positive, but the
ISO format goes something like this:

"YYYY-mm-DDTHH:MM:SS"

Whereas Boost interpretation of that is something like:

"YYYYmmDDT..."

Something else after 'T', not sure, is that seconds since the epoch?
Something like that.

Anyway. Parsing the tree is falling over on that interpretation.

A workaround is to leave the field out (for now), but longer term I
would like to preserve the time field in whatever date/time format
will work and parse ubiquitously over the wire.

Any recommendations? Thank you...

Regards,

Michael Powell


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net