Please vote on std.datetime

Kagamin spam at here.lot
Fri Dec 10 12:14:11 PST 2010


Fawzi Mohamed Wrote:

> Last thing, well is something I would have done differently (as I said  
> already in the past), is using doubles expressing number of seconds to  
> represent point in time, durations, and TimeOfDay. I know other  
> differs about this, but I really think that it is a very simple and  
> versatile type.

I actually have a problem with this format. I have an application that works with messages. The message has send date. The application was written in delphi so it uses double to represent DateTime. The message can be signed, the date can be included to the data to be signed, so the application uses the double format for sign buffer. Then I have .net application that should interoperate with delphi application, but you can't compute double value from string representation of DateTime in an interoperable way, the last bit depends on the order of computations, and if you miscompute it, the signatures will be incompatible.

I think, the point in time should be long, and millisecond precision is enough. Any higher precision is a very special case.


More information about the Digitalmars-d mailing list