We're updating the issue view to help you get more done. 

Fix8 has empty timestamps under windows

Description

On 05.12.2014 11:47, mk_yang@kab.hk wrote:
>
> I download it in this page
>
> http://fix8.org/downloads.html
>
> at link ZIP version 1.3.1
>
> url: https://github.com/fix8/fix8/archive/1.3.1.zip
>
>
>
>
>
> 发件人: Sergey Sedreev sedreev@mail.ru
> 发送时间: 2014年12月5日 12:14
> 收件人: dakka; fix8-support@googlegroups.com
> 抄送: mk_yang@kab.hk; mk_yang@kab.hk
> 主题: Re: Issues report with fix8-1.3.1 in windows platform.
>
>
>
> Seems we fixed that already. What exact git version is he on?
> S.
>
> dakka <avatarist@gmail.com> 5 декабря 2014 г. 1:54:29 написал:
>
> Sergey - any comments on this?
>
> /dakka
>
> On Thursday, 4 December 2014 17:37:02 UTC+11, mk_...@kab.hk wrote:
>
> Hi,Fix8 support team,
>
>
>
> I believe I found an issue that should be fixed, but with my account(tendollor) I can’t find any place I can make a report in Jira issues site.
>
>
>
> So I try email to you. My English is poor. So let’s say the code.
>
>
>
>
>
> Version:FIX8 1.3.1
>
>
>
> Environment: Windows Server08 R2,VS2013 with SP4
>
>
>
> Compile succesfully.
>
>
>
> Issues:
>
>
>
> File:/fix8-1.3.1/include/fix8/tickval.hpp line 72; function clock_gettime
>
>
>
> // Windows does not have clock_gettime, so we must supply it
>
> inline int clock_gettime(int X, struct timespec *tv)
>
> {
>
> LARGE_INTEGER t;
>
> FILETIME f;
>
> double nanoseconds;
>
> //static LARGE_INTEGER offset;
>
> static double frequencyToNanoseconds;
>
> static int initialized = 0;
>
> static BOOL usePerformanceCounter = 0;
>
>
>
> if (!initialized)
>
> {
>
> LARGE_INTEGER performanceFrequency;
>
> initialized = 1;
>
> usePerformanceCounter = QueryPerformanceFrequency(&performanceFrequency);
>
> if (usePerformanceCounter)
>
> {
>
> //QueryPerformanceCounter(&offset);
>
> frequencyToNanoseconds = (double)performanceFrequency.QuadPart / 1000000000.;
>
> }
>
> else
>
> {
>
> //offset = getFILETIMEoffset();
>
> frequencyToNanoseconds = 10.;
>
> }
>
> }
>
> if (usePerformanceCounter)
>
> QueryPerformanceCounter(&t);
>
> else
>
> {
>
> GetSystemTimeAsFileTime(&f);
>
> t.QuadPart = f.dwHighDateTime;
>
> t.QuadPart <<= 32;
>
> t.QuadPart |= f.dwLowDateTime;
>
> }
>
>
>
> //t.QuadPart -= offset.QuadPart;
>
> nanoseconds = (double)t.QuadPart / frequencyToNanoseconds;
>
> t.QuadPart = nanoseconds;
>
> tv->tv_sec = t.QuadPart / 1000000000;
>
> tv->tv_nsec = t.QuadPart % 1000000000;
>
> return 0;
>
> }
>
>
>
>
>
> I think this function want get UTCtime. But I can get this value
>
>
>
> usePerformanceCounter = QueryPerformanceFrequency(&performanceFrequency);
>
>
>
>
>
> and with this code
>
> if (usePerformanceCounter) //true
>
> QueryPerformanceCounter(&t); //so I will use this to get time
>
>
>
> But QueryPerformanceCounter is get the time from you start computer to now.
>
>
>
> So all fix engine get the wrong time
>
>
>
> Like Message’s sendingtime(tagid=52)
>
> Like logger’s timestamp.
>
>
>
> The logon message’s log like this
>
> 1970-01-10 10:09:49.659615096 8=FIX.4.39=10835=A49=Sender_Comp_Id56= Target_Comp_Id 34=152=19700110-01:26:22.88998=0108=10553=Username554=Password10=237
>
>
>
>
>
> I have 10 days dosen’t show down the computer.
>
>
>
> May be I’m not know well about fix8, I just thought this is the issue in windows platform.
>
>
>
> And what you think about this?
>
>
>
> I'm looking forward to your reply J
>
>
>
>
>
> Regards:Tendollor
>
>
>
> From:China
>
>
>
> Date:2014-12-04
>
>
>

Environment

Windows Server 2008 R2, x64, VS2013, downloaded from zipped source

Status

Assignee

Sergey Sedreev

Reporter

Sergey Sedreev

Labels

Branch

dev

Products

Open Source

Time tracking

2h

Components

Fix versions

Affects versions

1.3.1

Priority

Critical