{"templateId":"markdown","versions":[{"version":"opendelivery","label":"Open Delivery API","link":"/en/apis/docs/time-zone-conversion","default":true,"active":true,"folderId":"62a846bf"},{"version":"standard","label":"Standard Keeta API","link":"/en/apis/standard/docs/time-zone-conversion","default":false,"active":false,"folderId":"62a846bf"},{"version":"grocery","label":"Grocery Keeta API","link":"/en/apis/grocery/docs/time-zone-conversion","default":false,"active":false,"folderId":"62a846bf"}],"sharedDataIds":{"sidebar":"sidebar-@l10n/en/apis/@opendelivery/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Time Zone Conversion"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"time-zone-conversion","__idx":0},"children":["Time Zone Conversion"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"1-time-zone-conversion-target-object","__idx":1},"children":["1. Time Zone Conversion Target Object"]},"\n  There are 3 APIs involved in time zone handling:\n  ",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"b","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/en/apis/opendelivery/merchantendpoints/getmerchant"},"children":["Get information of a Merchant"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["services.serviceHours"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["availabilities"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"b","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/en/apis/opendelivery/merchantendpoints/merchantupdate"},"children":["New Merchant Update Notification"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["services.serviceHours"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["availabilities"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"b","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/en/apis/opendelivery/merchantendpoints/merchantstatus"},"children":["Get Merchant Status and Service Hours"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["services.serviceHours"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"2-time-zone-conversion-rules","__idx":2},"children":[" 2. Time Zone Conversion Rules"]},"\n  (1) All time-related fields in the documentation are transmitted in the ",{"$$mdtype":"Tag","name":"b","attributes":{},"children":["UTC+0"]}," time zone.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"\n  (2) The value in ",{"$$mdtype":"Tag","name":"b","attributes":{},"children":["timePeriods"]}," should always conform to the rule: ",{"$$mdtype":"Tag","name":"b","attributes":{},"children":["endTime > startTime"]},".",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"\n  (3) If the time spans a day after conversion to the UTC+0 time zone, it should be split into two parts.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"\n  (4) 24:00 should be transmitted as: 23:59:00.000Z.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"3-time-zone-conversion-examples","__idx":3},"children":[" 3. Time Zone Conversion Examples"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Take Brazil's official time zone ",{"$$mdtype":"Tag","name":"b","attributes":{},"children":["UTC-3"]}," as an example."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"31--data--timeperiod--combination-scenario","__idx":4},"children":[" 3.1 [ data + timePeriod ] combination scenario"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"1-the-conversion-to-utc0-will-not-cross-the-day","__idx":5},"children":[" (1) The conversion to UTC+0 will not cross the day"]},"\n  If the local time is: **2024-04-07 08:00-20:00**, the format transmitted in the API should be (after converting to UTC+0):\n",{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"[\n  {\n    \"date\": \"2021-04-07\",\n    \"timePeriods\": {\n        \"startTime\": \"11:00:00.000Z\",\n        \"endTime\": \"23:00:00.000Z\"\n    }\n  }\n]\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"2-the-conversion-to-utc0-will-cross-the-day","__idx":6},"children":[" (2) The conversion to UTC+0 will cross the day"]},"\n  If the local time is: **2024-04-07 10:00-22:00**, the format transmitted in the API should be (after converting to UTC+0):\n",{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"[\n  {\n    \"date\": \"2021-04-07\",\n    \"timePeriods\": {\n        \"startTime\": \"13:00:00.000Z\",\n        \"endTime\": \"23:59:00.000Z\"\n    }\n  },\n  {\n    \"date\": \"2021-04-08\",\n    \"timePeriods\": {\n        \"startTime\": \"00:00:00.000Z\",\n        \"endTime\": \"01:00:00.000Z\"\n    }\n  }\n]\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"32--dayofweek--timeperiod--combination-scenario","__idx":7},"children":[" 3.2 [ dayOfWeek + timePeriod ] combination scenario"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"1-the-conversion-to-utc0-will-not-cross-the-day-1","__idx":8},"children":[" (1) The conversion to UTC+0 will not cross the day"]},"\n  If the local time is: **Monday & Tuesday 08:00-20:00**, the format transmitted in the API should be (after converting to UTC+0):\n",{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"[\n  {\n    \"dayOfWeek\": [\n        \"MONDAY\",\n        \"TUESDAY\"\n    ],\n    \"timePeriods\": {\n        \"startTime\": \"11:00:00.000Z\",\n        \"endTime\": \"23:00:00.000Z\"\n    }\n  }\n]\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"2-the-conversion-to-utc0-will-cross-the-day-1","__idx":9},"children":[" (2) The conversion to UTC+0 will cross the day"]},"\n  If the local time is: **Monday & Tuesday 10:00-22:00**, the format transmitted in the API should be (after converting to UTC+0):\n",{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"[\n  {\n    \"dayOfWeek\": [\n        \"MONDAY\"\n    ],\n    \"timePeriods\": {\n        \"startTime\": \"11:00:00.000Z\",\n        \"endTime\": \"23:59:00.000Z\"\n    }\n  },\n  {\n    \"dayOfWeek\": [\n        \"TUESDAY\"\n    ],\n    \"timePeriods\": {\n        \"startTime\": \"00:00:00.000Z\",\n        \"endTime\": \"01:00:00.000Z\"\n    }\n  },\n  {\n    \"dayOfWeek\": [\n        \"TUESDAY\"\n    ],\n    \"timePeriods\": {\n        \"startTime\": \"11:00:00.000Z\",\n        \"endTime\": \"23:59:00.000Z\"\n    }\n  },\n  {\n    \"dayOfWeek\": [\n        \"WEDNESDAY\"\n    ],\n    \"timePeriods\": {\n        \"startTime\": \"00:00:00.000Z\",\n        \"endTime\": \"01:00:00.000Z\"\n    }\n  }\n]\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Finally merge into:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"[\n  {\n    \"dayOfWeek\": [\n        \"MONDAY\",\n        \"TUESDAY\"\n    ],\n    \"timePeriods\": {\n        \"startTime\": \"11:00:00.000Z\",\n        \"endTime\": \"23:59:00.000Z\"\n    }\n  },\n  {\n    \"dayOfWeek\": [\n        \"TUESDAY\",\n        \"WEDNESDAY\"\n    ],\n    \"timePeriods\": {\n        \"startTime\": \"00:00:00.000Z\",\n        \"endTime\": \"01:00:00.000Z\"\n    }\n  }\n]\n"},"children":[]}]},"headings":[{"value":"Time Zone Conversion","id":"time-zone-conversion","depth":1},{"value":"1. Time Zone Conversion Target Object","id":"1-time-zone-conversion-target-object","depth":2},{"value":"2. Time Zone Conversion Rules","id":"2-time-zone-conversion-rules","depth":2},{"value":"3. Time Zone Conversion Examples","id":"3-time-zone-conversion-examples","depth":2},{"value":"3.1 [ data + timePeriod ] combination scenario","id":"31--data--timeperiod--combination-scenario","depth":3},{"value":"(1) The conversion to UTC+0 will not cross the day","id":"1-the-conversion-to-utc0-will-not-cross-the-day","depth":4},{"value":"(2) The conversion to UTC+0 will cross the day","id":"2-the-conversion-to-utc0-will-cross-the-day","depth":4},{"value":"3.2 [ dayOfWeek + timePeriod ] combination scenario","id":"32--dayofweek--timeperiod--combination-scenario","depth":3},{"value":"(1) The conversion to UTC+0 will not cross the day","id":"1-the-conversion-to-utc0-will-not-cross-the-day-1","depth":4},{"value":"(2) The conversion to UTC+0 will cross the day","id":"2-the-conversion-to-utc0-will-cross-the-day-1","depth":4}],"frontmatter":{"slug":"/apis/opendelivery/time-zone-conversion","seo":{"title":"Time Zone Conversion"}},"lastModified":"2026-11-12T19:24:24.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/en/apis/opendelivery/time-zone-conversion","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}