What the event text looks like
An iCalendar event is a set of labeled lines between BEGIN:VEVENT and END:VEVENT. The format is defined in RFC 5545, published in 2009, and is the same one used by .ics calendar files.
A QR-sized example: BEGIN:VEVENT, SUMMARY:Bread baking class, DTSTART:20261015T170000Z, DTEND:20261015T190000Z, LOCATION:Maple Street Bakery, Portland, END:VEVENT. A full calendar file wraps events in BEGIN:VCALENDAR and adds fields such as UID and DTSTAMP, but QR codes often carry just the event block to save space.
- SUMMARY: the event title
- DTSTART and DTEND: start and end, as YYYYMMDDTHHMMSS
- LOCATION: place or address
- DESCRIPTION: longer notes
- A trailing Z means the time is in UTC
Getting the time right
Writing times in UTC with a trailing Z is the simplest way to make an event appear at the correct local time for everyone. A time without Z is treated as floating local time, which can shift for people in other time zones, and a named time zone needs extra data that makes the code larger.
All-day events can use a date-only value, such as DTSTART;VALUE=DATE:20261015.
Support and alternatives
Support for event codes in built-in camera apps varies; some offer to add the event directly, while others show the text or need a scanner app. Checking on the phones your audience uses is worth doing before printing.
A common alternative is a QR code that links to a hosted .ics file or an event page with add-to-calendar buttons. A link also allows the time or place to be corrected after the code is printed.