# How to Run EM Migration Tool - time zone migration script

`em_migrate_tz` script has 2 stages:


### 1. Map custom Control-M time zones to IANA time zones.

Run the script with the `-map` option:

Linux:`em_migrate_tz.sh -map`

Windows:`em_migrate_tz.bat -map`

### 2. Generate timezone files to be deployed to Control-M SaaS:
  
Run the script with  `generate` and `-mapping_file` option:

Linux:`em_migrate_tz.sh -generate -mapping_file <path to mapping file>`

Windows:`em_migrate_tz.bat -generate -mapping_file <path to mapping file>`

*Note:* `<path to mapping file>` refers to the mapping file generated when running the script with the `-map` option.

* The `em_migrate_tz.sh` and `em_migrate_tz.bat` scripts can be executed from any working directory on the EM environment.

After the running the script with `-generate` option the timezone files will be created in the output folder.

### 3. Map custom Control-M time zones And Generate timezone files (Combine 2 previous stages).

Run the script with the `-map_and_generate` option:

Linux:`em_migrate_tz.sh -map_and_generate`

Windows:`em_migrate_tz.bat -map_and_generate`

### 4. Using the generated time zone files when migrating the EM to Control-M SaaS 

When migrating the EM to Control-M SaaS using the `run_saas_migration_import` script, specify the full path to the output folder via the `--alternative_tz_files_location` command-line option.

Linux:`run_saas_migration_import.sh --alternative_tz_files_location <path to generated time zone folder>`

Windows:`run_saas_migration_import.bat --alternative_tz_files_location <path to generated time zone folder>`
