Open any Sketch file in Photopea and press File - Export - SVG. All properties of shapes, fills and strokes are preserved. You can include raster layers, text layers, or even rasterize text layers (to avoid worrying about fonts).
Photopea is written completely in Javascript.
The task was a program, that always prints a timestamp, but your program prints it "almost always" (when random has not returned a zero). I am not sure if it is a solution, but I like it very much! :)
I wonder if there could be a better solution without randomness.
Hi, making it short was not my goal. I wrote it "in my own style" and then just counted the lines.
What obfuscation do you see? There are not many comments, but I think it should be readable.