24 tmptim = (tmptim * 4) + 70;
57 int tmptim =
static_cast<int>(caltim /
_YEAR_SEC) + 70;
86template <
typename TimeType>
95 TimeType caltim = *timp;
105 bool is_leap_year =
false;
110 ptm->tm_yday =
static_cast<int>(caltim /
_DAY_SEC);
111 caltim -=
static_cast<TimeType
>(ptm->tm_yday) *
_DAY_SEC;
114 int const*
const mdays = is_leap_year ?
_lpdays :
_days;
117 for (tmptim = 1 ; mdays[tmptim] < ptm->tm_yday ; tmptim++)
121 ptm->tm_mon = --tmptim;
123 ptm->tm_mday = ptm->tm_yday - mdays[tmptim];
130 ptm->tm_hour =
static_cast<int>(caltim / 3600);
131 caltim -=
static_cast<TimeType
>(ptm->tm_hour) * 3600L;
133 ptm->tm_min =
static_cast<int>(caltim / 60);
134 ptm->tm_sec =
static_cast<int>(caltim - (ptm->tm_min) * 60);
163 if (
ptd->_gmtime_buffer !=
nullptr)
165 return ptd->_gmtime_buffer;
168 ptd->_gmtime_buffer = _malloc_crt_t(
tm, 1).detach();
169 if (
ptd->_gmtime_buffer ==
nullptr)
175 return ptd->_gmtime_buffer;
182template <
typename TimeType>
198 return common_gmtime(time_value);
203 return common_gmtime(time_value);
__acrt_ptd *__cdecl __acrt_getptd_noexit(void)
bool __cdecl __crt_time_is_leap_year(TimeType const yr)
TimeType __cdecl __crt_time_elapsed_leap_years(TimeType const yr)
result_buffer_count char *const _In_ int const _In_ bool const _In_ unsigned const _In_ STRFLT const _In_ bool const _Inout_ __crt_cached_ptd_host &ptd throw()
_In_ size_t const _In_ int _In_ bool const _In_ unsigned const _In_ __acrt_rounding_mode const _Inout_ __crt_cached_ptd_host & ptd
tm *__cdecl _gmtime32(__time32_t const *const time_value)
errno_t __cdecl _gmtime32_s(tm *const result, __time32_t const *const time_value)
static int __cdecl compute_year(__time32_t &caltim, bool &is_leap_year)
tm *__cdecl _gmtime64(__time64_t const *const time_value)
static errno_t __cdecl common_gmtime_s(tm *const ptm, TimeType const *const timp)
tm *__cdecl __getgmtimebuf()
errno_t __cdecl _gmtime64_s(tm *const result, __time64_t const *const time_value)
#define _VALIDATE_RETURN_ERRCODE(expr, errorcode)
#define _VALIDATE_RETURN_ERRCODE_NOEXC(expr, errorcode)