Skip to main content

Timezones

Many date/time utility methods in B2Win Suite scripting accept an optional timezone parameter. This page describes how to specify a timezone.


Default Timezone Behavior

If you do not pass a timezone argument, the workflow's default timezone is used. The default timezone is set per-workspace in the workspace configuration. To use the server's local time without specifying a timezone explicitly, simply omit the parameter.


Timezone ID Formats

The preferred way to specify a timezone is by its standard IANA timezone ID (also known as a zoneinfo ID). These IDs account for daylight saving time (DST) transitions.

Format: "Region/City"

// Use a named timezone
InstantUtil.now("Europe/Amsterdam")
LocalDateTimeUtil.now("America/New_York")
LocalDateTimeUtil.now("Asia/Tokyo")

Common Examples:

Timezone IDDescription
UTCCoordinated Universal Time (no DST)
Europe/LondonUK time (BST in summer)
Europe/AmsterdamCentral European Time (CET/CEST)
Europe/ParisSame as Amsterdam (CET/CEST)
Europe/BerlinSame as Amsterdam (CET/CEST)
America/New_YorkUS Eastern Time (EST/EDT)
America/ChicagoUS Central Time (CST/CDT)
America/DenverUS Mountain Time (MST/MDT)
America/Los_AngelesUS Pacific Time (PST/PDT)
Asia/TokyoJapan Standard Time (no DST)
Asia/ShanghaiChina Standard Time (no DST)
Asia/KolkataIndia Standard Time (no DST)
Australia/SydneyAustralian Eastern Time (AEST/AEDT)

Custom GMT Offset IDs

You can also specify a fixed offset from GMT. These IDs do not adjust for daylight saving time.

Syntax:

GMT Sign Hours : Minutes
GMT Sign Hours Minutes
GMT Sign Hours

Where:

  • Sign is + or -
  • Hours is a digit or two digits (0–23)
  • Minutes is exactly two digits (00–59)

Examples:

IDMeaning
GMTUTC/GMT (no offset)
GMT+11 hour ahead of GMT
GMT-55 hours behind GMT
GMT+10:0010 hours ahead of GMT
GMT-08:008 hours behind GMT
GMT+05305 hours 30 minutes ahead (equivalent to Asia/Kolkata without DST)
LocalDateTimeUtil.now("GMT+3")
LocalDateTimeUtil.now("GMT-05:00")
note

Custom GMT offset IDs are locale-independent and must use ASCII digits (Basic Latin Unicode block). If the format is invalid, the system falls back to "GMT".

The normalized form is always: GMT±HH:MM — for example, GMT+05:30 or GMT-08:00.


Choosing Named vs. Custom IDs

Use caseRecommendation
Scheduling by local time (handles DST)Named ID (Europe/Amsterdam)
Fixed offset regardless of DSTCustom GMT offset (GMT+1)
Storing or comparing UTC momentsUTC
Server's local timeOmit the parameter

Reference

Full list of supported timezone IDs: Java TimeZone documentation