Skip to content

put_time returning time zone as "Easter" #21582

Closed
@jrobichaux

Description

@jrobichaux

In the latest emscripten, a call to std::put_time( std::localtime(&t_time), "%Z" ) on my Windows machine returns "Easter" instead of "Eastern Daylight Time".

This worked properly on the previous version I was using (3.1.51).

Minimal repro:

time_test.cpp

#include <ctime>
#include <iomanip>
#include <iostream>

int main()
{
	std::time_t t_time = std::time( NULL );
	std::cout << "time zone = " << std::put_time( std::localtime(&t_time), "%Z" ) << std::endl;
	return 0;
}

Compile with:
em++ time_test.cpp

Run with:
node a.out.js

On my machine (Windows 10) this returns "time zone = Easter". If I compile as a standard Windows executable it properly returns "time zone = Eastern Daylight Time".

Version of emscripten/emsdk:

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.56 (cf90417346b78455089e64eb909d71d091ecc055)
clang version 19.0.0git (https:/github.com/llvm/llvm-project 34ba90745fa55777436a2429a51a3799c83c6d4c)
Target: wasm32-unknown-emscripten
Thread model: posix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions