cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to implement Time zone based licensing in Flexnet Licensing?

How to implement Time zone based licensing in Flexnet Licensing?

Question:

How can a licensing publisher implement the time zone based licensing in their native licensing setup?

Answer:

In the Product documentation, document name "Programming Reference for License file based licensing", there is a dedicated chapter explaining the functionality names "Time Zone Licensing" (latest version of documentation library attached with this article).

Basic architecture:

The TZ keyword specifies the time zones in which the FlexEnabled feature is licensed to run. The time zones are specified either as values relative to Greenwich Mean Time (GMT) or as the time zone of the license server (SERVERTZ).


At run time, when a license checkout is requested, the time and time zone of the client machine is read and compared to the time zone specified in the license file. If the time zone read from the client machine matches the time zone in the license file, the checkout proceeds as usual. If, however, there is a mismatch between the time zone read from the client machine and the time zone specified in the license file, the checkout request is denied.

Note the following when using the TZ keyword:

• 15 minutes of clock drift is allowed when validating the time and time zone of the client with those of the license server.
• 60 minutes is allowed for Daylight Saving Time (DST) when validating the time and time zone of the client with those of the license server.
• If a license is borrowed with SERVERTZ, license rights are not bound to any time zone when the borrowed license is used.If SERVERTZ is specified for an unserved, node-locked license, license rights are not bound to any time zone.

Important • Time zone licensing is intended for use with customers with whom you have a trusted relationship. 
There is no secure programmatic restriction with time zone licensing functionality: If an end user manually changes
the time zone to match the time zone specified in the license certificate, a license can be consumed.

How to Implement time zone based licensing:

- Add TZ keyword in the INCREMENT/FEATURE line, which tells the license server that licensing is time zone bound.

- With the TZ keyword, we can provide a particular timezone, or the range, or a set of different time zones in which we want to allow the clients to checkout the license. For ex:

FEATURE f1_single demo 1.0 permanent 4 TZ=‐08 SIGN=0
FEATURE f2_multiple demo 1.0 permanent 4 TZ="+05 +01" SIGN=0

The feature f1_single can be used only on clients that reside in the time zone GMT–08:00, while the feature f2_multiple can be used on clients that reside in time zone GMT+05:00 or on clients that reside in time zone GMT+01:00.

FEATURE f1_range demo 1.0 permanent 4 TZ="‐05:‐08" SIGN=0
FEATURE f2_range demo 1.0 permanent 4 TZ="–05:–00 +00:+01" SIGN=0


The feature f1_range can be used on clients that reside in time zones that fall in the range GMT–05:00 through GMT–08:00, inclusive. The feature f2_range can be used on clients that reside in time zones that fall in the range from GMT–05:00 through GMT+01:00, inclusive

FEATURE f1_range_multi demo 1.0 permanent 4 TZ="‐08 +00:+02 +05.30:+08.30" SIGN=0

FEATURE f1_half demo 1.0 permanent 4 TZ=+05.30 SIGN=0
FEATURE f2_quarter demo 1.0 permanent 4 TZ=+05.45 SIGN=0

The feature f1_range_multi can be used on clients that reside in time zones that fall in the ranges GMT+00:00 through GMT+02:00 and GMT+5:30 and GMT+08:30, inclusive, and on clients that reside in the time zone GMT–08:00.

The feature f1_half can be used on clients that reside in time zone GMT+05:30, which is India, while the feature f2_quarter can be used on clients that reside in time zone GMT+05:45, which is Nepal.

- Post that crypt your license file again and it should be ready to serve the licensing based on particular timezone.

Further Info about "TZ" Keyword:

Enables you to enforce license usage for a feature relative to a time zone; where the time zone is specified and measured relative to Greenwich Mean Time (GMT). Use TZ on a FEATURE or INCREMENT line to specify that the computer system on which the FlexEnabled application is running must be within a specified time zone or range of time zones, or in the same time zone as the license server (using the value SERVERTZ). You can also specify half (.30) and quarter (.45) time zones, if applicable.

  • Time zone values must be preceded by a + (plus) or – (minus) sign. Every + or – sign must be followed by two decimal digit hours h. The only cases in which you would specify values for minutes would be if specifying a half (.30) or quarter (.45) time zone.
  • Valid range for the TZ keyword is –12 to +13. To specify GMT as the time zone value, use either TZ=+00 or TZ=–00.
  • To specify multiple time zones, use a space as a delimiter and enclose the values in quotes. If TZ keyword has a single value, quotes are ignored when the license file is encrypted. For example, TZ="‐06 ‐08" identifies the GMT-06:00 and GMT-08:00 time zones.
  • To specify a time zone range, use a colon between time zone values. The from and to values for the range must use the same + or – sign. For example, TZ=‐06:‐08 identifies a time zone range that includes all the time zones from GMT-06:00 to GMT-08:00.
  • If the time zone range includes GMT, you must use two range specifications. For example, TZ=“–05:–00 +00:+01" specifies the range from GMT–05:00 to GMT+01:00, inclusive.
    ***The TZ keyword is not supported with decimal-format licenses.
  • SERVERTZ is a case-sensitive value that can be used with the TZ keyword to specify that the license server should serve licenses only if the time zone in which the client resides matches the time zone in which the license server resides.

             For ex: "FEATURE f1_server demo 1.0 permanent 4 TZ=SERVERTZ SIGN=0"

             SERVERTZ is valid only for use with a served license model, and cannot be combined with any other values.

For Testing Environment Only (Never use them in production):

  • Flexible API attribute: LM_A_TZ_OVERRIDE works with the lc_set_attr function to override the client time zone or time zone and time settings. (See the C/C++ Function Reference for details about this attribute and related error codes.)
  •  Vendor daemon variable: ls_allow_tz_override operates in your test environment to enable the vendor daemon to read values you set in the LM_SET_SERVER_TIMEZONE and LM_SET_SERVER_TIME environment variables.
  • Environment variables: LM_SET_SERVER_TIMEZONE and LM_SET_SERVER_TIME carry the override values you set for the license server time zone and time, respectively. These variables are not used unless ls_allow_tz_override is set to 1.
  • LM_SET_SERVER_TIME environment variable can be used only in combination with LM_SET_SERVER_TIMEZONE.

Note • The Flexible API attribute, LM_A_TZ_OVERRIDE, and the vendor variable, ls_allow_tz_override, are provided for use in testing time zone licensing. See FlexNet Publisher’s C/C++ Function Reference for more information about these and other time zone–related attributes.

For more details on them kindly refer to the documentation.

Was this article helpful? Yes No
No ratings
Version history
Last update:
‎May 07, 2020 03:48 PM
Updated by:
Contributors