📄 dvbhelpers.c
字号:
// MainFreq.c: implementation of the MainFreq class.
//
//////////////////////////////////////////////////////////////////////
#include "dvbutils.h"
#include"PrNvm.h"
#include"dvbepg.h"
#include"PrTuner.h"
#include"PrVideo.h"
#include"PrAudio.h"
VOID MJDToSystemTime(LPSYSTEMTIME st,USHORT mjd,INT utc)
{
USHORT y,m,d;
GetYMDFromMJD(mjd,&y,&m,&d);
st->wYear=(WORD)y;
st->wMonth=(WORD)m;
st->wDay=(WORD)d;
st->wDayOfWeek=GetWeekDay(mjd);
GetHMSFromUTC(utc,&st->wHour,&st->wMinute,&st->wSecond);
st->wYear+=1900;
//TRACE("MJDToSystemTime(%04X %06X)=%d/%d/%d %d:%d:%d\r\n",
// mjd,utc,y+1900,m,d,st->wHour,st->wMinute,st->wSecond);
}
VOID MJDToLocalTime(LPSYSTEMTIME st,USHORT mjd,INT utc)
{
USHORT y,m,d;
FILETIME ft;
TIME_ZONE_INFORMATION tz;
GetYMDFromMJD(mjd,&y,&m,&d);
st->wYear=(WORD)y;
st->wMonth=(WORD)m;
st->wDay=(WORD)d;
st->wDayOfWeek=GetWeekDay(mjd);
GetHMSFromUTC(utc,&st->wHour,&st->wMinute,&st->wSecond);
st->wYear+=1900;
SystemTimeToFileTime(st,&ft);
GetTimeZoneInformation(&tz);
ft.dwLowDateTime-=tz.Bias;
FileTimeToSystemTime(&ft,st);
}
DWORD UTCTime2SecondsFrom1970(USHORT mjd,INT utc)
{
SYSTEMTIME st;
FILETIME ft;
MJDToSystemTime(&st,mjd,utc);
SystemTimeToFileTime(&st,&ft);
//TRACE("UTCTime2SecondsFrom1970(%04X %06X)=%X\r\n",mjd,utc,ft.dwLowDateTime);
return ft.dwLowDateTime;
}
VOID MJDToFileTime(LPFILETIME ft,USHORT mjd,INT utc)
{
SYSTEMTIME st;
MJDToSystemTime(&st,mjd,utc);
SystemTimeToFileTime(&st,ft);
}
VOID SystemTimeToMJD(LPSYSTEMTIME st,INT*mjd,INT*utc)
{
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -