KDateTime: new revised version

Nicolas Goutte nicolasg at snafu.de
Thu Nov 24 07:44:57 GMT 2005

On Thursday 24 November 2005 00:33, David Jarvie wrote:
> I attach a new revision of kdatetime.h. For size reasons, I've made
> kdatetime.cpp available for download at
> http://www.astrojar.org.uk/linux/download/kdatetime.cpp rather than attach
> it. I hope that I've addressed all the comments made.
> - There is now a non-explicit constructor which takes just a QDateTime as
> parameter, and uses the UTC or LocalTime spec of the QDateTime.
> - The fromString() parsing code is completely rewritten to avoid copyright
> problems.
> - I've added support for RFC2822 format strings.
> - I've changed the return type of toUTC() and toLocal() to KDateTime, and
> added toZone(). These provide conversion between time zones in KDateTime. I
> think that this is the most natural way to convert date/times between
> different zones.
> It's still untested - once things stabilise enough, I'll write the test
> program.

I have looked at the code this time.

I am not sure about how the local time is transformed to a string. I think it 
would be more useful to find the right time zone and to output the right time 
zone in the string.

Especially for RFC 2822, where, as far as I know, the -0000 means more 
something like: "The OS is too stupid to know its local time zone."

Also for IS0 8601 dates, perhaps the timezone should be nothing instead of a 

Have a nice day!

More information about the kde-core-devel mailing list