New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating DateTimeConverter to be able to convert between microseconds #425
Updating DateTimeConverter to be able to convert between microseconds #425
Conversation
and adding extra constructor to the DateTime Fields to allow the precision to be passed
Hi, What is the status of this Pull Request - has it just been abandoned? |
Hi. Does this means that nanoseconds will not be implemented or that it take longer? Best regards |
The problem is that QuickFixN currently uses the .net DateTime object for all it's parsing of Date/Times. The System.DateTime structure only has a precision to 100-nanoseconds (https://msdn.microsoft.com/en-us/library/system.datetime%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396). This means that to support nanosecond precision, QuickFixN would have to use an alternate means to parse and store Date/Time values(for instance, Jon Skeet's NodaTime project might be useful to resolve this or a custom built solution). I do not know how the owners of this project would want to proceed with such a change and as it is not a requirement of mine I have not spent any time looking at the problem. |
#352 is becoming a critical issue for those that need to comply with MiiFID 2. What this pr does to help this issue
Critically, what this pr does not do to address potential MiiFID2 requirements
For reference, QuickFIX/j and QuickFIX/Go have an implementation that addresses these last two bullet points. Given the above, is there still value in merging this pr, or could it be used as a POC for a more complete implementation? |
…mongoose/quickfixn into Issue-352-MicroSecondSupport
I've updated the pull request and added new session property called: TimeStampPrecision this can set to: Second and will set the SendingTime and OrigSendingTime to the appropriate precision. The existing MillisecondsInTimeStamp property can still be used, it just sets the above property to either Second or Millisecond depending on whether it is N or Y. However, the value of TimeStampPrecision will take precendence if both properties are present. |
🍻 Thanks @huwmongoose ! |
This provides some basic support for Microsecond parsing. The Issue 352 talks about nano-seconds but that would be more complicated. I introduced a new enum for users to specify what level time formatting they want (second, millisecond, microsecond). The existing interface should behave exactly as they did before as they convert the boolean to the relevant value of the above enum and then call the new method that takes this as a parameter.