Przemyslaw Czerpak wrote:
Fine but I suggest to create separate function to extract number of
seconds from some starting day, f.e.:
   HB_FUNC( HB_MILLISEC )
   {
      hb_retnin( hb_dateMilliSeconds() );
   }

and use it instead of seconds().

Hi,


I've looked to the source and can commit new implementation. hb_dateMilliSeconds() is OK, but it returns different results for different platforms. It's "julian milliseconds" on Windows and milliseconds from 1970-01-01 on Unixes.

I think it would be good to give the same meaning for both platforms. Julian milliseconds is 48bit integer now. It is not far from double precision (52bit) and hb_dataMilliSeconds()*16 conversion to from double can show float point side effects. So, milliseconds from 1970-01-01 are better in this case, but it is a little platform oriented and will return negative values for birthdays of us or our fathers.

What choice do you prefer?


Best regards,
Mindaugas
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to