Java Date Time - ZoneId normalized() example








ZoneId normalized() normalizes the time-zone ID, returning a ZoneOffset where possible.

Syntax

normalized has the following syntax.

public ZoneId normalized()

Example

The following example shows how to use normalized.

import java.time.ZoneId;

public class Main {
  public static void main(String[] args) {
    ZoneId z = ZoneId.systemDefault();
    z = z.normalized();
    System.out.println(z);
  } 
}

The code above generates the following result.