79236597

Date: 2024-11-29 10:00:34
Score: 1
Natty:
Report link

After reviewing my original code, I realized the root cause of the issue was a missing !return statement and the critical !endfunction declaration. These were omitted right before the @enduml tag in my initial implementation. Unfortunately, PlantUML doesn't provide a helpful error message in this case, which made debugging a bit challenging. It was a good reminder of how tricky it can be to review one's own code objectively.

That said, I’ve resolved the issue! Along the way, I also identified and fixed a related bug: when using %date("YYYY-MM-dd", %now()), failing to use the correct format string ("yyyy-MM-dd") could lead to errors after "2024-12-28". This issue has been addressed in my updated code.

For anyone struggling with converting dates to epoch_time, the logic isn’t overly complex, but feel free to refer to my solution below.

Resources:

Hopefully, this helps others avoid similar pitfalls!

Reasons:
  • Contains signature (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: TopChul