mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:48:12 +00:00
LibC: Ensure tzname and related fields are intialized
If a program never invokes tzset, the tzname variable should have system dependent default values.
This commit is contained in:
parent
cd0e5ccd3f
commit
024f869f09
1 changed files with 5 additions and 5 deletions
|
@ -354,15 +354,15 @@ size_t strftime(char* destination, size_t max_size, const char* format, const st
|
||||||
return fits ? str.length() : 0;
|
return fits ? str.length() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
long timezone;
|
|
||||||
long altzone;
|
|
||||||
char* tzname[2];
|
|
||||||
int daylight;
|
|
||||||
|
|
||||||
static char __tzname_standard[TZNAME_MAX];
|
static char __tzname_standard[TZNAME_MAX];
|
||||||
static char __tzname_daylight[TZNAME_MAX];
|
static char __tzname_daylight[TZNAME_MAX];
|
||||||
constexpr const char* __utc = "UTC";
|
constexpr const char* __utc = "UTC";
|
||||||
|
|
||||||
|
long timezone = 0;
|
||||||
|
long altzone = 0;
|
||||||
|
char* tzname[2] = { const_cast<char*>(__utc), const_cast<char*>(__utc) };
|
||||||
|
int daylight = 0;
|
||||||
|
|
||||||
void tzset()
|
void tzset()
|
||||||
{
|
{
|
||||||
// FIXME: Actually parse the TZ environment variable, described here:
|
// FIXME: Actually parse the TZ environment variable, described here:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue