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
Named Timezone IDs (Recommended)
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 ID | Description |
|---|---|
UTC | Coordinated Universal Time (no DST) |
Europe/London | UK time (BST in summer) |
Europe/Amsterdam | Central European Time (CET/CEST) |
Europe/Paris | Same as Amsterdam (CET/CEST) |
Europe/Berlin | Same as Amsterdam (CET/CEST) |
America/New_York | US Eastern Time (EST/EDT) |
America/Chicago | US Central Time (CST/CDT) |
America/Denver | US Mountain Time (MST/MDT) |
America/Los_Angeles | US Pacific Time (PST/PDT) |
Asia/Tokyo | Japan Standard Time (no DST) |
Asia/Shanghai | China Standard Time (no DST) |
Asia/Kolkata | India Standard Time (no DST) |
Australia/Sydney | Australian 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:
Signis+or-Hoursis a digit or two digits (0–23)Minutesis exactly two digits (00–59)
Examples:
| ID | Meaning |
|---|---|
GMT | UTC/GMT (no offset) |
GMT+1 | 1 hour ahead of GMT |
GMT-5 | 5 hours behind GMT |
GMT+10:00 | 10 hours ahead of GMT |
GMT-08:00 | 8 hours behind GMT |
GMT+0530 | 5 hours 30 minutes ahead (equivalent to Asia/Kolkata without DST) |
LocalDateTimeUtil.now("GMT+3")
LocalDateTimeUtil.now("GMT-05:00")
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 case | Recommendation |
|---|---|
| Scheduling by local time (handles DST) | Named ID (Europe/Amsterdam) |
| Fixed offset regardless of DST | Custom GMT offset (GMT+1) |
| Storing or comparing UTC moments | UTC |
| Server's local time | Omit the parameter |
Reference
Full list of supported timezone IDs: Java TimeZone documentation