Time zones
Summarize
Summary of Time zones
ServiceNow stores all times in Coordinated Universal Time (UTC) and displays them according to the user’s local time zone based on their preferences. The system uses primary time zone IDs in a Country/City format, with some IDs acting as links to these primary zones (e.g., US/Pacific links to America/LosAngeles). Administrators should set a system default time zone to avoid reliance on server defaults.
Show less
Key Features
- Time Zone Representation: Primary time zones follow the Country/City format; linked time zones behave identically in functionality.
- Daylight Saving Time (DST): Time zones defined by location automatically adjust for DST, whereas time zones defined by name (e.g., GMT) typically do not. Exceptions exist, so understanding Java’s time zone handling is recommended.
- User Preferences: Users can select their own time zone in their profile settings, which overrides the system default for their session.
- Email Notifications: Timestamps use the system time zone, not the recipient’s; an option exists to append the system time zone to outbound emails via a property setting.
- Service Level Agreements (SLAs): SLA definitions allow selection of a time zone source, including options like caller’s time zone or SLA definition time zone, with cautions about undefined user time zones causing unpredictable results.
- Scripting: Server-side scripts use GlideSystem API methods to retrieve time values consistent with the configured time zones.
- DST Enhancements: Reports and queries now observe daylight saving time rules, impacting trend and line charts and filters.
- Time Zone Changer: Users can temporarily change their time zone during a session from system settings; it resets to the default or user profile setting upon next login.
Practical Guidance for Administrators
- Configure the system default time zone (glide.sys.default.tz) to ensure consistent time behavior across the platform.
- Encourage users to set their personal time zones in their profiles for accurate local time display.
- Understand the implications of SLA time zone settings, especially when selecting caller-based time zones.
- Use the Java time zone class list accessible through user records to verify supported time zone IDs.
- Control email timestamp time zone display via the glide.email.append.timezone property.
All times are stored in Coordinated Universal Time (UTC) and appear globally based on the system time zone. However, times appear to users in their local time zone, according to their user preference settings.
Time zone representation
- For example, US/Pacific is a link to the America/Los_Angeles time zone. Both America/Los_Angeles and US/Pacific represent Pacific Standard Time with the same zone offset and Daylight Savings Time (DST) schedule.
- Other than the representation, there is no impact on date and time functionality.
- Depending on how the server is configured, it might return the Country/City or link, for example, US/Pacific or America/Los_Angeles.
- Administrators should configure their system with a default time zone
glide.sys.default.tzto avoid system dependencies. For more information, see Time zone representation.
Daylight Saving Time
- If you specify a time zone based on the time zone name (for example, GMT), which is discouraged, it does not typically adjust for daylight saving time. There are however exceptions to these guidelines.
- For more detailed information on how daylight saving time is handled in Java, see https://www.iana.org/time-zones and https://en.wikipedia.org/wiki/Tz_database.
User preferences
The System default appears as System ([name of the default time zone]). For example, if the System time zone is America/Los_Angeles, the user sees System (America/Los Angeles).
Java time zone class
- In the Type filter text field, enter sys_user.list.
- Open one of the user records in the listing.
- Right-click the time zone field and select Show
Choices.
The resulting list is a complete listing of available time zone IDs.
Time zones in email notifications
The glide.email.append.timezone property in controls whether to append the time zone. If set to true, the system time zone of the instance is appended to any dates or date/times in outbound email messages (for example, 2010-07-02 04:01:14 PST).
Time zones in service level agreements
Service level agreements have different options for which time zone to use. To set a time-zone for SLAs, navigate to the SLA definition and locate the Timezone source field, and select an option.
- If you select the time zone for the caller, unpredictable behavior can occur if the caller does not have a time zone defined.
- If you select the time zone for the SLA definition, you must manual specify the time zone on the form for the SLA.
Time zone in scripting
When you create scripting on the server, the script uses several GlideSystem date and time functions to obtain time values. For more information about specific methods and to learn the format in which each returns the requested time, see the GlideSystem API.
Enhancements
DST enhancement requires that reports and queries observe Daylight Saving Time rules. Changes affect trend charts, line charts, and filters using the "trend on" operation.
Time zone changer
The time zone changer is active by default. Users can change their time zone for the current session in the system settings (the gear on the top right of the banner). At the next login, the time zone setting reverts to the system default, or user profile setting for time zone.