Opened 5 years ago

Last modified 5 years ago

#4271 new defect

sh4 stapi5 It does not work with realtime clock

Reported by: satxtreme Owned by:
Priority: Please fill in Component: ! Please select...
Severity: Please fill in Keywords:
Cc: Sensitive: no


It does not work...2 hours the difference between real time

Change History (6)

comment:1 by Aeon3, 5 years ago

Please post more details:
What does not work? What is the error?
Please post a log.

comment:2 by satxtreme, 5 years ago

Real time 18.49
log is 16.49

2015/07/30 16:49:58 655848B9 c (ecm) oscam (0500@040620/289F/0899/4C:A1A10C98F8919DF7C9F9EE62EE1B017D): found (1044 ms) by satxtreme - HTB HD

comment:3 by Vitaliy69, 5 years ago

Not critical!

It's need to use Fortis API to get current time zone or sinc with NTP server.

Last edited 5 years ago by Vitaliy69 (previous) (diff)

comment:4 by satxtreme, 5 years ago

Not critical, , but it would be correct...

comment:5 by Vitaliy69, 5 years ago

Ok. As a variant need to add flag STAPI_CLOCK_FIX (config addition) and use Fortis API (latest verion here It's needed some include files and link with plugapi.a. To get wright time:

char* showTime()

char *strBuf;
int hour, min, sec, mjd;
dword tm;

tm = GetCurTime(&hour, &min, &sec, &mjd); Fortis API func
tm = Time2Local(tm);
mjd = (tm >> 16) & 0xFFFF;
hour = (tm >> 8) & 0xFF;
min = tm & 0xFF;

strBuf = GetStrBuf(); Fortis API auto_ptr

sprintf(strBuf, "%02d:%02d:%02d", hour, min, sec);

return strBuf;


Or! It's a bad decision.

May be need to add in oscam.dvdapi some param to shift time zone for log file:

time_zone_shift = -8

It will be good cross platform independent decision.

Last edited 5 years ago by Vitaliy69 (previous) (diff)

comment:6 by satxtreme, 5 years ago

Good idea...

Note: See TracTickets for help on using tickets.