private immutable string[] months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
string dstr = "29-Apr-2019 11:04";
ubyte[] full = new ubyte[128];
auto m = matchFirst(dstr, regex(r"([0-9]{2})-([A-Z][a-z]{2})-([0-9]{4}) ([0-9]{2}):([0-9]{2})"));
assert(m.length > 0, "Date string is invalid");
DateTime d = DateTime(1990, 1, 1);
d.month = to!Month(months.join.indexOf(m[2])/3+1);
d.minute = m[5].to!ubyte;
dateProgrammed = SysTime(d, 0.seconds);
copy("test_string".representation, full[8..16]);
import std.format: format;
string date = format!("%d-%3s-%d %02d:%02d")(dateProgrammed.day,
months[dateProgrammed.month-1], dateProgrammed.year,
dateProgrammed.hour, dateProgrammed.minute);
copy(date.representation, full[24..44]);
Base64.encode(full).writeln;