Home > Requirements > Date And Time > Time Zones > Time Zone Converter
Report generated 11-04-2023 10:42

Feature: Time Zone Converter

Converts time from time zone to another taking into account Daylight Saving Time (DST) and accepts present, past, or future dates; Time zones among the
list of tz database.

Scenarios

Given the datetime 2021-10-06T21:35:51 in time zone "UTC"

When conversion is done to time zone {tzid}

Then The local date time should be {date time}

Examples:

tz nameOffsetexample countryexample citytziddate time
Hawaii Standard Time (HST)UTC -10USHonoluluPacific/Honolulu2021-10-06T11:35:51
Hawaii-Aleutian Daylight Time (HDT)UTC -9USAdakAmerica/Adak2021-10-06T12:35:51
Alaska Daylight Time (AKDT)UTC -8USAnchorageAmerica/Anchorage2021-10-06T13:35:51
Pacific Daylight Time (PDT)UTC -7USLos AngelesAmerica/Los_Angeles2021-10-06T14:35:51
Pacific Daylight Time (PDT)UTC -7CAVancouverAmerica/Vancouver2021-10-06T14:35:51
Mountain Standard Time (MST)UTC -7USPhoenixAmerica/Phoenix2021-10-06T14:35:51
Mountain Daylight Time (MDT)UTC -6USDenverAmerica/Denver2021-10-06T15:35:51
Central Daylight Time (CDT)UTC -5USChicagoAmerica/Chicago2021-10-06T16:35:51
Eastern Daylight Time (EDT)UTC -4USNew YorkAmerica/New_York2021-10-06T17:35:51
Eastern Daylight Time (EDT)UTC -4USDetroitAmerica/Detroit2021-10-06T17:35:51
Eastern Daylight Time (EDT)UTC -4CATorontoAmerica/Toronto2021-10-06T17:35:51
Atlantic Daylight Time (ADT)UTC -3CAHalifaxAmerica/Halifax2021-10-06T18:35:51
Newfoundland Daylight Time (NDT)UTC -2:30CASt JohnsAmerica/St_Johns2021-10-06T19:05:51
Central European Time (CET)UTC +1DZAfrica/AlgiersAfrica/Algiers2021-10-06T22:35:51
British Summer Time (BST )UTC +1GBLondonEurope/London2021-10-06T22:35:51
Central European Summer Time (CEST)UTC +2FRParisEurope/Paris2021-10-06T23:35:51
Central European Summer Time (CEST)UTC +2ESMadridEurope/Madrid2021-10-06T23:35:51
Japan Standard Time (JST)UTC +9JPTokyoAsia/Tokyo2021-10-07T06:35:51

Given the datetime 2021-10-06T09:06:40 in time zone "America/New_York"

When conversion is done to time zone {tzid}

Then The local date time should be {date time}

Examples:

tz nameOffsetexample countryexample citytziddate time
Hawaii Standard Time (HST)UTC -10USHonoluluPacific/Honolulu2021-10-06T03:06:40
Hawaii-Aleutian Daylight Time (HDT)UTC -9USAdakAmerica/Adak2021-10-06T04:06:40
Alaska Daylight Time (AKDT)UTC -8USAnchorageAmerica/Anchorage2021-10-06T05:06:40
Pacific Daylight Time (PDT)UTC -7USLos AngelesAmerica/Los_Angeles2021-10-06T06:06:40
Mountain Standard Time (MST)UTC -7USPhoenixAmerica/Phoenix2021-10-06T06:06:40
Mountain Daylight Time (MDT)UTC -6USDenverAmerica/Denver2021-10-06T07:06:40
Central Daylight Time (CDT)UTC -5USChicagoAmerica/Chicago2021-10-06T08:06:40
Eastern Daylight Time (EDT)UTC -4USDetroitAmerica/Detroit2021-10-06T09:06:40

Feature Coverage By Scenario

Test Outcomes

Test Performance

Key Statistics

Number of Scenarios 2 Total Duration 1s
Total Number of Test Cases 26 Fastest Test 64ms
Number of Manual Test Cases 0 Slowest Test 102ms
Tests Started Apr 11, 2023 10:42:09 Average Execution Time 72ms
Tests Finished Apr 11, 2023 10:42:11 Total Execution Time 1s

Automated Tests

feature Scenario Context Steps Started Total Duration Result
Time Zone Converter 1: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Hawaii Standard Time (HST), Offset=UTC -10, example country=US, example city=Honolulu, tzid=Pacific/Honolulu, date time=2021-10-06T11:35:51
windows 3 10:42:09 084ms SUCCESS
Time Zone Converter 2: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Hawaii-Aleutian Daylight Time (HDT), Offset=UTC -9, example country=US, example city=Adak, tzid=America/Adak, date time=2021-10-06T12:35:51
windows 3 10:42:09 075ms SUCCESS
Time Zone Converter 3: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Alaska Daylight Time (AKDT), Offset=UTC -8, example country=US, example city=Anchorage, tzid=America/Anchorage, date time=2021-10-06T13:35:51
windows 3 10:42:09 065ms SUCCESS
Time Zone Converter 4: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Pacific Daylight Time (PDT), Offset=UTC -7, example country=US, example city=Los Angeles, tzid=America/Los_Angeles, date time=2021-10-06T14:35:51
windows 3 10:42:09 069ms SUCCESS
Time Zone Converter 5: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Pacific Daylight Time (PDT), Offset=UTC -7, example country=CA, example city=Vancouver, tzid=America/Vancouver, date time=2021-10-06T14:35:51
windows 3 10:42:09 069ms SUCCESS
Time Zone Converter 6: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Mountain Standard Time (MST), Offset=UTC -7, example country=US, example city=Phoenix, tzid=America/Phoenix, date time=2021-10-06T14:35:51
windows 3 10:42:09 069ms SUCCESS
Time Zone Converter 7: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Mountain Daylight Time (MDT), Offset=UTC -6, example country=US, example city=Denver, tzid=America/Denver, date time=2021-10-06T15:35:51
windows 3 10:42:09 073ms SUCCESS
Time Zone Converter 8: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Central Daylight Time (CDT), Offset=UTC -5, example country=US, example city=Chicago, tzid=America/Chicago, date time=2021-10-06T16:35:51
windows 3 10:42:09 065ms SUCCESS
Time Zone Converter 9: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Eastern Daylight Time (EDT), Offset=UTC -4, example country=US, example city=New York, tzid=America/New_York, date time=2021-10-06T17:35:51
windows 3 10:42:10 078ms SUCCESS
Time Zone Converter 10: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Eastern Daylight Time (EDT), Offset=UTC -4, example country=US, example city=Detroit, tzid=America/Detroit, date time=2021-10-06T17:35:51
windows 3 10:42:10 069ms SUCCESS
Time Zone Converter 11: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Eastern Daylight Time (EDT), Offset=UTC -4, example country=CA, example city=Toronto, tzid=America/Toronto, date time=2021-10-06T17:35:51
windows 3 10:42:10 073ms SUCCESS
Time Zone Converter 12: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Atlantic Daylight Time (ADT), Offset=UTC -3, example country=CA, example city=Halifax, tzid=America/Halifax, date time=2021-10-06T18:35:51
windows 3 10:42:10 071ms SUCCESS
Time Zone Converter 13: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Newfoundland Daylight Time (NDT), Offset=UTC -2:30, example country=CA, example city=St Johns, tzid=America/St_Johns, date time=2021-10-06T19:05:51
windows 3 10:42:10 067ms SUCCESS
Time Zone Converter 14: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Central European Time (CET), Offset=UTC +1, example country=DZ, example city=Africa/Algiers, tzid=Africa/Algiers, date time=2021-10-06T22:35:51
windows 3 10:42:10 075ms SUCCESS
Time Zone Converter 15: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=British Summer Time (BST ), Offset=UTC +1, example country=GB, example city=London, tzid=Europe/London, date time=2021-10-06T22:35:51
windows 3 10:42:10 064ms SUCCESS
Time Zone Converter 16: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Central European Summer Time (CEST), Offset=UTC +2, example country=FR, example city=Paris, tzid=Europe/Paris, date time=2021-10-06T23:35:51
windows 3 10:42:10 075ms SUCCESS
Time Zone Converter 17: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Central European Summer Time (CEST), Offset=UTC +2, example country=ES, example city=Madrid, tzid=Europe/Madrid, date time=2021-10-06T23:35:51
windows 3 10:42:10 102ms SUCCESS
Time Zone Converter 18: Local time of some cities worldwide from Universal Time Coordinated (UTC)
tz name=Japan Standard Time (JST), Offset=UTC +9, example country=JP, example city=Tokyo, tzid=Asia/Tokyo, date time=2021-10-07T06:35:51
windows 3 10:42:10 071ms SUCCESS
Time Zone Converter 1: Local time in some US cities from New York local time
tz name=Hawaii Standard Time (HST), Offset=UTC -10, example country=US, example city=Honolulu, tzid=Pacific/Honolulu, date time=2021-10-06T03:06:40
windows 3 10:42:10 070ms SUCCESS
Time Zone Converter 2: Local time in some US cities from New York local time
tz name=Hawaii-Aleutian Daylight Time (HDT), Offset=UTC -9, example country=US, example city=Adak, tzid=America/Adak, date time=2021-10-06T04:06:40
windows 3 10:42:10 071ms SUCCESS
Time Zone Converter 3: Local time in some US cities from New York local time
tz name=Alaska Daylight Time (AKDT), Offset=UTC -8, example country=US, example city=Anchorage, tzid=America/Anchorage, date time=2021-10-06T05:06:40
windows 3 10:42:10 067ms SUCCESS
Time Zone Converter 4: Local time in some US cities from New York local time
tz name=Pacific Daylight Time (PDT), Offset=UTC -7, example country=US, example city=Los Angeles, tzid=America/Los_Angeles, date time=2021-10-06T06:06:40
windows 3 10:42:11 064ms SUCCESS
Time Zone Converter 5: Local time in some US cities from New York local time
tz name=Mountain Standard Time (MST), Offset=UTC -7, example country=US, example city=Phoenix, tzid=America/Phoenix, date time=2021-10-06T06:06:40
windows 3 10:42:11 069ms SUCCESS
Time Zone Converter 6: Local time in some US cities from New York local time
tz name=Mountain Daylight Time (MDT), Offset=UTC -6, example country=US, example city=Denver, tzid=America/Denver, date time=2021-10-06T07:06:40
windows 3 10:42:11 071ms SUCCESS
Time Zone Converter 7: Local time in some US cities from New York local time
tz name=Central Daylight Time (CDT), Offset=UTC -5, example country=US, example city=Chicago, tzid=America/Chicago, date time=2021-10-06T08:06:40
windows 3 10:42:11 069ms SUCCESS
Time Zone Converter 8: Local time in some US cities from New York local time
tz name=Eastern Daylight Time (EDT), Offset=UTC -4, example country=US, example city=Detroit, tzid=America/Detroit, date time=2021-10-06T09:06:40
windows 3 10:42:11 078ms SUCCESS

Manual Tests

No manual tests were recorded
Serenity BDD version 3.6.22