PW01-L04 · Logic change

Current date in a local time zone

Replace $DATE$ with an explicit UTC conversion and format.

ProjectWise-specific
Migration outcome

Separate UTC evaluation time from the date required in a specific time zone.

ProjectWise context

All supported ProjectWise CEL contexts

PW system variableLegacy ProjectWise configuration
$DATE$
CELProjectWise CEL
'{0:yyyy-MM-dd}'.format(utcTime.toLocalTime('Europe/Bratislava'))

What is different

utcTime is a stable UTC evaluation time. CEL makes the requested local time zone and output format explicit.

  1. The result no longer depends on the ProjectWise Explorer machine time settings.
  2. toLocalTime() uses TZDB/IANA time-zone names.
  3. Formatting produces a year-month-day string.

Migration goal

Return the evaluation date as text for a chosen time zone.

What changes

CEL starts with utcTime; the expression then chooses the time zone and format. This removes a hidden dependency on the client machine's local time.

Why the CEL solution is clearer

The time zone is part of the reviewed rule. The example intentionally uses Europe/Bratislava; change it for a different locality.

Before deployment

Check behavior around midnight and daylight-saving transitions. Formatting returns a string, not a timestamp object.

Sources

  • BENTLEY-PW-CEL-SYSVARS$DATE$ replacement and UTC notes.
  • BENTLEY-PW-CEL-TIMEutcTime, toLocalTime(), and formatting.