2020-06-23 15:53:23 +08:00
|
|
|
|
#ifndef __HANDLETIME_H__
|
2020-06-23 15:27:59 +08:00
|
|
|
|
#define __HANDLETIME_H__
|
|
|
|
|
|
|
|
|
|
//#undef EXTERN
|
|
|
|
|
//#ifdef __HANDLETIME_C__
|
|
|
|
|
//#define EXTERN
|
|
|
|
|
//#else /*__HANDLETIME_C__*/
|
|
|
|
|
//#define EXTERN extern
|
|
|
|
|
//#endif
|
|
|
|
|
|
|
|
|
|
//EXTERN struct timeval NowTime;
|
|
|
|
|
//EXTERN int DEBUG_ADJUSTTIME;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//BOOL setNewTime( void );
|
|
|
|
|
#if 0
|
|
|
|
|
|
|
|
|
|
#define NIGHT_TO_MORNING 906
|
|
|
|
|
#define MORNING_TO_NOON 1006
|
|
|
|
|
#define NOON_TO_EVENING 356
|
|
|
|
|
#define EVENING_TO_NIGHT 456
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
#define NIGHT_TO_MORNING 700
|
|
|
|
|
#define MORNING_TO_NOON 930
|
|
|
|
|
#define NOON_TO_EVENING 200
|
|
|
|
|
#define EVENING_TO_NIGHT 300
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/*??????HiO?LS?????*/
|
2020-06-23 15:53:23 +08:00
|
|
|
|
/* ??150(希)*60=9000企=750*12 ? LS1吋 */
|
|
|
|
|
/* LS1200?? LS1吋 */
|
|
|
|
|
/* LS100吋? LS1夙 */
|
2020-06-23 15:27:59 +08:00
|
|
|
|
typedef struct tagLSTIME
|
|
|
|
|
{
|
|
|
|
|
int year;
|
|
|
|
|
int day;
|
|
|
|
|
int hour;
|
|
|
|
|
}LSTIME;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
|
{
|
|
|
|
|
LS_NOON,
|
|
|
|
|
LS_EVENING ,
|
|
|
|
|
LS_NIGHT,
|
|
|
|
|
LS_MORNING ,
|
|
|
|
|
}LSTIME_SECTION;
|
|
|
|
|
|
|
|
|
|
// ?????????
|
|
|
|
|
extern LSTIME SaTime;
|
|
|
|
|
extern long serverTime;
|
|
|
|
|
extern long FirstTime; //the second
|
|
|
|
|
extern long clientTime; //the third
|
2020-06-23 15:53:23 +08:00
|
|
|
|
extern int SaTimeZoneNo; // ?????┼
|
|
|
|
|
extern BOOL TimeZonePalChangeFlag; // ??┼??????????????
|
2020-06-23 15:27:59 +08:00
|
|
|
|
|
|
|
|
|
void RealTimeToSATime( LSTIME *lstime );
|
|
|
|
|
/*void LSTimeToRealTime( LSTIME *lstime, long *t);*/
|
|
|
|
|
LSTIME_SECTION getLSTime (LSTIME *lstime);
|
2020-06-23 15:53:23 +08:00
|
|
|
|
// ??┼??????????? ***********************************/
|
2020-06-23 15:27:59 +08:00
|
|
|
|
void TimeZoneProc( void );
|
|
|
|
|
|
|
|
|
|
#endif /*__HANDLETIME_H__*/
|