增加tz_dsttime类型定义

This commit is contained in:
Meco Man 2021-05-02 09:24:41 +08:00
parent 47de526525
commit 8ec1a63b23
3 changed files with 15 additions and 2 deletions

View File

@ -20,6 +20,19 @@ extern "C" {
#ifndef _TIMEVAL_DEFINED
#define _TIMEVAL_DEFINED
#define DST_NONE 0 /* not on dst */
#define DST_USA 1 /* USA style dst */
#define DST_AUST 2 /* Australian style dst */
#define DST_WET 3 /* Western European dst */
#define DST_MET 4 /* Middle European dst */
#define DST_EET 5 /* Eastern European dst */
#define DST_CAN 6 /* Canada */
#define DST_GB 7 /* Great Britain and Eire */
#define DST_RUM 8 /* Rumania */
#define DST_TUR 9 /* Turkey */
#define DST_AUSTALT 10 /* Australian style with shift in 1986 */
/*
* Structure returned by gettimeofday(2) system call,
* and used in other calls.

View File

@ -424,7 +424,7 @@ int gettimeofday(struct timeval *tv, struct timezone *tz)
*/
if(tz != RT_NULL)
{
tz->tz_dsttime = 0;
tz->tz_dsttime = DST_NONE;
tz->tz_minuteswest = -(RT_LIBC_FIXED_TIMEZONE * 60);
}