diff --git a/src/xrCore/Crypto/xr_dsa_signer.cpp b/src/xrCore/Crypto/xr_dsa_signer.cpp index 794a3efe1ff..beb6299ce95 100644 --- a/src/xrCore/Crypto/xr_dsa_signer.cpp +++ b/src/xrCore/Crypto/xr_dsa_signer.cpp @@ -42,13 +42,10 @@ shared_str const xr_dsa_signer::sign_mt(u8 const * data, return m_dsa.sign (m_private_key, m_sha.pointer(), m_sha.digest_length); } -char const * current_time(string64 & dest_time) +char *current_time(string64 &dest_time) { - time_t tmp_curr_time; - - dest_time[0] = 0; - _time64 (&tmp_curr_time); - tm* tmp_tm = _localtime64(&tmp_curr_time); + const time_t tmp_curr_time = std::time(nullptr); + tm *tmp_tm = std::localtime(&tmp_curr_time); xr_sprintf(dest_time, sizeof(dest_time), "%02d.%02d.%d_%02d:%02d:%02d", diff --git a/src/xrCore/Crypto/xr_dsa_signer.h b/src/xrCore/Crypto/xr_dsa_signer.h index 9a086c08d10..564f360e9ad 100644 --- a/src/xrCore/Crypto/xr_dsa_signer.h +++ b/src/xrCore/Crypto/xr_dsa_signer.h @@ -28,6 +28,6 @@ class XRCORE_API xr_dsa_signer }; //xr_dsa_signer -XRCORE_API char const * current_time(string64 & dest_time); +XRCORE_API char *current_time(string64 &dest_time); -#endif //#ifndef XR_DSA_SIGNER_INCLUDED \ No newline at end of file +#endif //#ifndef XR_DSA_SIGNER_INCLUDED