Skip to content

[libc] Make time libraries more future proof with respect to the 2038 problem #111108

@Rajveer100

Description

@Rajveer100

Currently the following files in src/time:

  • ctime.cpp
  • ctime_r.cpp
  • ctime_s.cpp

Do this check:

*t_ptr > cpp::numeric_limits<int32_t>::max()

time_t may not be a 32 bit number, and making this check may cause problems in approximately 14 years:

2038 Problem

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions