#getting the current time as a string during build-time

1 messages · Page 1 of 1 (latest)

random zenith
#

Hi, I'm trying to get a string that is the current datetime as of the build. I tried this library but it requires libc which I guess isn't available at build time?
https://github.com/frmdstryr/zig-datetime

I've gotten the flow into the game correctly, but just getting the time as a nice string is stumping me

_ = b.option([]const u8, "build_date", "date of the build");
const exe_options = b.addOptions();
exe.addOptions("build_options", exe_options);
exe_options.addOption([]const u8, "build_date", now_str[0..]);
GitHub

A date and time module for Zig. Contribute to frmdstryr/zig-datetime development by creating an account on GitHub.

whole acorn
whole acorn
random zenith
#

oh wait maybe it was because I was using c_allocator Facepalm

whole acorn
#

lol