16template <
typename TimeType>
29 static TimeType
const invalid_time =
static_cast<TimeType
>(-1);
42 int elapsed_days_this_year =
dy +
_days[mo - 1];
44 ++elapsed_days_this_year;
46 TimeType
const elapsed_years =
static_cast<TimeType
>(yr) -
_BASE_YEAR;
52 TimeType
const elapsed_days =
55 elapsed_days_this_year;
57 TimeType
const elapsed_hours = elapsed_days * 24 +
hr;
58 TimeType
const elapsed_minutes = elapsed_hours * 60 + mn;
59 TimeType
const elapsed_seconds = elapsed_minutes * 60 + sc;
71 TimeType
const timezone_adjusted_seconds = elapsed_seconds +
timezone;
74 TimeType
const dst_adjusted_seconds = timezone_adjusted_seconds + dstbias;
77 return dst_adjusted_seconds;
80 tm_value.
tm_yday = elapsed_days_this_year;
87 return dst_adjusted_seconds;
90 return timezone_adjusted_seconds;
103 return common_loctotime_t<__time32_t>(yr, mo,
dy,
hr, mn, sc, dstflag);
116 return common_loctotime_t<__time64_t>(yr, mo,
dy,
hr, mn, sc, dstflag);
int __cdecl _isindst(_In_ tm *_Time)
bool __cdecl __crt_time_is_leap_year(TimeType const yr)
TimeType __cdecl __crt_time_elapsed_leap_years(TimeType const yr)
bool __cdecl __crt_time_is_day_valid(int const yr, int const mo, int const dy)
#define _VALIDATE_RETURN_NOEXC(expr, errorcode, retexpr)
__time32_t __cdecl __loctotime32_t(int const yr, int const mo, int const dy, int const hr, int const mn, int const sc, int const dstflag)
static TimeType __cdecl common_loctotime_t(int yr, int const mo, int const dy, int const hr, int const mn, int const sc, int const dstflag)
__time64_t __cdecl __loctotime64_t(int const yr, int const mo, int const dy, int const hr, int const mn, int const sc, int const dstflag)
_CRTIMP errno_t __cdecl _get_daylight(_Out_ int *_Daylight)
_CRTIMP errno_t __cdecl _get_dstbias(_Out_ long *_Daylight_savings_bias)
_CRTIMP errno_t __cdecl _get_timezone(_Out_ long *_Timezone)