Skip to content

epcisTimeZoneOffset

  • The core functions, which every industry uses.
const epcisTimeZoneOffset: RegExp = /^([+]|[-])((0[0-9]|1[0-3]):([0-5][0-9])|14:00)$/;

RegExp matching a GS1 EPCIS 2.0 eventTimeZoneOffset: the pattern the EPCIS JSON schema (https://ref.gs1.org/standards/epcis/epcis-json-schema.json, a normative artefact of EPCIS 2.0 / ISO/IEC 19987) gives for the field, verbatim: ^([+]|[-])((0[0-9]|1[0-3]):([0-5][0-9])|14:00)$.

import { epcisTimeZoneOffset } from "@northguild/gmt";
epcisTimeZoneOffset.test("-05:00") // true
epcisTimeZoneOffset.test("+14:00") // true
epcisTimeZoneOffset.test("+14:01") // false (past the range GS1 allows)
epcisTimeZoneOffset.test("Z") // false (a designator, not an offset)
epcisTimeZoneOffset.test("+0200") // false (no colon)

regex/epcis.ts

Accessibility
© 2026 NorthGuild · Licences

Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.